• Use the Variable Name as an Argument

    General Talk
    4
    0 Votes
    4 Posts
    880 Views
    B
    @Cairyn and @m_magalhaes Thanks for the responses. The dictionary route seems like a good workaround. I think I'm going with it. Have a great day ahead!
  • Spline Generator based on Generator

    Cinema 4D SDK
    3
    0 Votes
    3 Posts
    579 Views
    bacaB
    @m_adam Oh, yes! Thanks, it works just fine.
  • Force cache rebuild in python

    Cinema 4D SDK r19 r20 python
    5
    0 Votes
    5 Posts
    1k Views
    rsodreR
    @m_adam Thanks Maxime. Your example really shows that the cache must be built independent of how much processing it takes. Leaves me knowing that there must be something wrong on my modifiers, and indeed there was. I was checking if bt != nullptr inside ModifyObject(). I remember I copied this from some example, and it was interrupting the modifier to process. When the script is over, it would fire again with bt filled and finish deforming.
  • Force custom file format in LoadDialog()

    Cinema 4D SDK python
    2
    0 Votes
    2 Posts
    507 Views
    r_giganteR
    Hi Shellan, thanks for reaching out us. Assuming that you refer to the Python general function c4d.storage.LoadDialog() at the current time you can't specify a file format since the value passed as force_suffix even is present is ignored - as written in the documentation - . Best, Riccardo
  • Melting Edges

    General Talk
    3
    0 Votes
    3 Posts
    742 Views
    R
    Thank you so much. I was thinging that I had to provide an edge index. Never thought that it would just require to select the points that define the edges. Great!!!
  • 0 Votes
    2 Posts
    561 Views
    Leo_SaramagoL
    I figured it out. The missing piece is a listener that's supposed to be added in main(), something like: def main(): obj = op.GetObject() bc = c4d.BaseContainer() obj.AddEventNotification(op, c4d.NOTIFY_EVENT_MESSAGE, 0, bc) The reason why this was not so obvious earlier today is that I read somewhere that there was no need for adding listeners in main(), that I would be adding unnecessary tasks. This is probably my fault, I may have misinterpreted or assumed things from a different context. But, to my defense, I must say that the code that works has no listeners in it. Have a look! Well, this is where it gets tricky: the listener code had been there indeed, but I had erased it after a few iterations(because I thought it was overkill). This means that the listener is still working despite the fact that I had it erased from the Python Tag code, in other words, it's garbage. I hope this helps other users as well as the Maxon team(you guys rule!) Thanks for your time, Leo
  • GeUserarea crash when Redraw() in Message()

    Cinema 4D SDK r20 python
    3
    1 Votes
    3 Posts
    764 Views
    M
    @m_adam oh,i miss this reason,thank you : )
  • 0 Votes
    4 Posts
    1k Views
    Leo_SaramagoL
    @m_magalhaes said in User Data button Python Tag r19 - avoid "index out of depth" console feedback: if desc_id.GetDepth() > 1 Thanks a lot, Manuel! It's perfect now.
  • Access the Limit Min/Max in the User Data Manager

    Cinema 4D SDK r20 python
    5
    0 Votes
    5 Posts
    991 Views
    B
    @m_adam said in Access the Limit Min/Max in the User Data Manager: In conclusion, you can't drive the enable/disable status of the limit checkbox since this is fully handled by the User Data Manager GeDialog, but you can simulate what this dialog does. Still a bit over my head but thanks for the clarification. So the code pointed above is to simulate what the dialog function.
  • problems with CAWeightMgr

    Cinema 4D SDK r19 python
    5
    0 Votes
    5 Posts
    1k Views
    R
    Hi Manuel, perfect - in the Script Manager everything works as expected. Running the code via python tag isn't important to me - I just wasn't aware of this difference ScriptMgr <> PythonTag concerning the execution of the code. Thanks a lot for your solution ! Cheers, Jens
  • 0 Votes
    2 Posts
    674 Views
    r_giganteR
    Hi kurzemnieks, thanks for reaching out us. With regard to your question, I confirm that it's actually not possible because Attribute Manager Window functionality are not exposed in the API and, additionally, being possible to open multiple Attribute windows at the same time with multiple items highlighted belonging to different object makes the parameter selection not connected to the object. [image: 1558687886248-f8a5865c-2fa2-40d4-9022-7199a8a6e3b3-image.png] Best regards, Riccardo
  • Polygon dimensions

    Cinema 4D SDK python r20
    4
    1
    0 Votes
    4 Posts
    1k Views
    r_giganteR
    Hi Pim, thanks for reaching out us. With regard to your question, given for comments from Cairyn, I recommend to refine your approach and to look on the web since there are a few different strategies to find the largest inscribed rectangle in a non-convex polygon (among them I recommend having a look at this). With regard to the points walking direction for a given polygon this is defined by the polygon normal and the left-hand rule and it should definitively not be randomly defined. Cheers, Riccardo
  • Large Delay with Python Interpreter in PyCharm

    Cinema 4D SDK r20 python sdk
    3
    0 Votes
    3 Posts
    667 Views
    M
    Hi @blastframe, I can only confirm what's @mp5gosu said, and confirm that c4dpy is a complete Cinema 4D executable, just opened as a python interpreter mode. So nothing to do here, unfortunately. Cheers, Maxime.
  • 0 Votes
    3 Posts
    595 Views
    M
    Hi @bentraje, since you rotate the axis (with SetMg) you also need to update the tangents according to the correct axis since tangents are in local space of points positions which are also in local space of the object. But as you figured is more rigging than a programming issue. And if you already solve the issue congratz! Cheers, Maxime.
  • Pycharm - Invalid Python SDK

    Cinema 4D SDK r20 python sdk
    3
    1
    0 Votes
    3 Posts
    11k Views
    ?
    @m_adam said in Pycharm - Invalid Python SDK: Hi, @blastframe thanks for contact us. So far we never encounter this issue and we are not able to reproduce it so few ideas to try: Make sure you have permission to write in the Cinema 4D folder and subfolder. Flush the cache, https://stackoverflow.com/a/45099651. Send us your PyCharm log, see https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files Cheers, Maxime. Hi @m_adam, Thank you for the reply. I ran PyCharm as an Administrator and flushed the cache. I still received the same error. When I looked at the log, I found a lot of missing file errors, which made me think I had the python.exe (c4dpy.exe) file in the wrong location. When I moved the file to the same folder as the R20 .exe, PyCharm started working. I was confused about the file location because, while in the Install instructions from the C4D Python SDK Documentation has the c4dpy in the C4D folder, this image made it seem like it could exist in a separate folder: [image: 1558553507512-c4dpy_pycharm_win2.png] I would have expected a file location similar to the default Windows location: C:\Program Files\MAXON\Cinema 4D R20\python.exe Thank you again. I have one follow-up question that I'll ask as a new topic.
  • ObjectData plugin Draw() question

    Cinema 4D SDK python r19
    4
    0 Votes
    4 Posts
    1k Views
    chuanzhenC
    @m_magalhaes Thanks,i will try to use C++
  • Disable a tag from Python

    Cinema 4D SDK
    4
    0 Votes
    4 Posts
    1k Views
    B
    Sorry for the delay! Thanks for the help; I did manage to get it working. The ability to drag any control to the console is very useful, so thanks for that tip in particular. I'll take a look at those links, Maxime. Sorry for the hassle.
  • Set Keyframes through a Python Tag

    Cinema 4D SDK r20 python
    9
    0 Votes
    9 Posts
    2k Views
    B
    @m_adam Gotcha. Work as expected. Thanks for the response. Have a great day ahead!
  • Splitting Selections maintaining Point Order

    Cinema 4D SDK r20 python
    6
    2
    0 Votes
    6 Posts
    1k Views
    M
    A CRC or a Checksum is basically a way to uniquely identify data. https://www.howtogeek.com/363735/what-is-a-checksum-and-why-should-you-care/
  • Bug on GetActiveObjects() on R20.057?

    Cinema 4D SDK r20 python
    4
    0 Votes
    4 Posts
    1k Views
    ManuelM
    Hello, nothing more to add here except that we confirm and thanks @C4DS for his answer. Cheers Manuel