• 2 Votes
    9 Posts
    1k Views
    M
    This is fixed in R23. Cheers, Maxime.
  • Make clean-up after script

    Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    770 Views
    r_giganteR
    Hi @iluxa7k thanks for reaching out us. With regard to your question, as already pointed out by @zipit , the Python del statement just is only responsible for decrementing the reference counter for the instance being "deleted" and not to actually free the memory used by the instance itself. This is clearly noted in the official Python documentation on the Note coming along with object.__del__(self) in Python 3 or object.__del__(self) in Python 2 . Given that, also consider that the del app statement you've described in your first post might not actually deliver the "clean-up" action you're thinking about. Best, Riccardo
  • Rotating Spline Points

    Cinema 4D SDK s22 python sdk
    8
    0 Votes
    8 Posts
    2k Views
    ?
    @nophoto Very nice! Thank you
  • 0 Votes
    4 Posts
    994 Views
    ManuelM
    hi, i'll set that thread to solved tomorrow without further feedback Cheers, Manuel
  • 0 Votes
    9 Posts
    1k Views
    B
    @m_magalhaes Thanks for the response. The confusion is entirely mine. I was confused because I initially thought the GetName and SetName is only for typical C4D objects. but there is actually a separate GetName and SetName functions for the TreeView objects. I was able to retrieve the new string by just this code: def SetName(self,root, userdata, obj, name): print name # new name when you hit enter I can now use the name variable to use in my separate renaming function (i.e. rename a folder for which the TreeView was based on). Thanks!
  • 0 Votes
    3 Posts
    409 Views
    B
    @m_magalhaes Thanks! It works as expected
  • TreeViewFunctions, two LV_USER fields

    Cinema 4D SDK r20 python
    8
    1
    0 Votes
    8 Posts
    1k Views
    P
    Thanks, it is working.
  • update User Data with Preset info

    Moved Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    1k Views
    ferdinandF
    Hi, you cannot, because the data container of a BaseList2D is not dynamically typed (like Python itself), but bound to data types specified in its description. If you want to change the data type of an user data element, you will have to modify the description of that element via GetUserDataContainer and SetUserDataContainer. There is also no 2D-Vector type in Cinema, only the crosshair thing custom GUI which you can apply to a Vector description element. Cheers, zipit
  • Setting up ObjectData plugin priority in Python

    Cinema 4D SDK python sdk
    3
    0 Votes
    3 Posts
    735 Views
    M
    Hi @Eduardo-Oliveira first of all welcome on the PluginCafe community. I think @zipit already provided you some correct answers or at least point you that this workflow is kind of strange for a Cinema 4D user since normally the object by itself doesn't really set its own position, but it's up to a tag (constraint Tag) to define the object position to another one. But in case you really want to do it, doing it in the Execute method of your ObjectData is fine. def AddToExecution(self, op, list): list.Add(op, c4d.EXECUTIONPRIORITY_GENERATOR, c4d.EXECUTIONFLAGS_CACHEBUILDING) return True def Execute(self, op, doc, bt, priority, flags): op.SetMg(doc.GetFirstObject().GetMg()) return c4d.EXECUTIONRESULT_OK You also need to ensure you registered your object with the flag c4d.OBJECT_CALL_ADDEXECUTION so AddToExecution and Execute are called. Cheers, Maxime.
  • Implement A Rudimentary Licensing Solution?

    Cinema 4D SDK r21 python
    13
    0 Votes
    13 Posts
    1k Views
    B
    Thanks will close the thread for now.
  • Unnecessary Executions Under BFM_INPUT_VALUE

    Cinema 4D SDK r21 python
    5
    0 Votes
    5 Posts
    585 Views
    B
    @zipit Thanks for the confirmation!
  • 0 Votes
    4 Posts
    487 Views
    ManuelM
    Hello, thanks for the answer by the way you could also clone the renderdata, modify the clone and send it to as a parameter to the function RenderDocument. That way, you don't have to "restore" them. Just in case, don't forget that data may not be saved in the BaseContainer. Cheers, Manuel
  • 0 Votes
    19 Posts
    3k Views
    M
    The bug is fixed in R23. Cheers, Maxime
  • SetActiveRenderData Does Not Work As Expected?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    465 Views
    B
    @PluginStudent Thanks for the explanation. Your solution works as expected
  • 0 Votes
    6 Posts
    2k Views
    M
    @m_adam said in PolygonObject.SetSelectEdges() and the Neighbor() class, a giant dilemma: ... Hope it answers your questions, Cheers, Maxime Thank you Maxime, this is a lot of useful info. Let me think through all of this and reply here if I have any further issues.
  • 0 Votes
    6 Posts
    1k Views
    dskeithD
    Realizing I never responded to this Thank you @m_magalhaes, @mikegold10, and @PluginStudent. I ended up manually making a list of the parameters I wanted to copy and iterating through all of them. Not ideal, but at least glad to know there wasn't an automated method I was missing.
  • Global Variable doesn't work on CoreMessage?

    Cinema 4D SDK r21 python
    7
    0 Votes
    7 Posts
    1k Views
    M
    @bentraje I don't have that much to add on your topic since I think @zipit already explained everything nicely. In any case some good resource for you about how global variable works in Python Global keyword in Python and Mutable vs Immutable Objects in Python. Regarding your last question, I think you should open a new topic, but the short answer there is no way to pass directly a variable with a MessageData, the best way is to use a scope accessible by both part and store this variable in this shared scope (can be global or any other). Cheers, Maxime.
  • Copy Material with Current State to Object

    Moved Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    1k Views
    SwinnS
    Got it. Thanks, again, zipit for you answer.
  • Access Class B's function inside Class A?

    General Talk r21 python
    5
    0 Votes
    5 Posts
    951 Views
    B
    @Cairyn @zipit @C4DS Thank you all for the responses. I ended up with @C4DS suggestion in using SpecialEventAdd() and CoreMessage for simplicity sake. Have a great day ahead!
  • Treeview Creates An Extra Column?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    417 Views
    B
    @m_adam Thanks! Works as expected