Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Register
    • Login
    1. Maxon Developers Forum
    2. Tags
    3. python
    Log in to post

    • All categories
    • P

      TreeViewFunctions, two LV_USER fields

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK r20 python
      8
      1
      0 Votes
      8 Posts
      1k Views
      P
      Thanks, it is working.
    • SwinnS

      update User Data with Preset info

      Watching Ignoring Scheduled Pinned Locked 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
    • E

      Setting up ObjectData plugin priority in Python

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python sdk
      3
      0 Votes
      3 Posts
      812 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.
    • B

      Implement A Rudimentary Licensing Solution?

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK r21 python
      13
      0 Votes
      13 Posts
      1k Views
      B
      Thanks will close the thread for now.
    • B

      Unnecessary Executions Under BFM_INPUT_VALUE

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK r21 python
      5
      0 Votes
      5 Posts
      653 Views
      B
      @zipit Thanks for the confirmation!
    • B

      Changing Display Filter Does Not Work When Rendering?

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK r21 python
      4
      0 Votes
      4 Posts
      534 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
    • CairynC

      Still not possible to find out what's visible in the Timeline?

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK r21 c++ python
      19
      0 Votes
      19 Posts
      3k Views
      M
      The bug is fixed in R23. Cheers, Maxime
    • B

      SetActiveRenderData Does Not Work As Expected?

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK r21 python
      3
      0 Votes
      3 Posts
      522 Views
      B
      @PluginStudent Thanks for the explanation. Your solution works as expected
    • M

      PolygonObject.SetSelectEdges() and the Neighbor() class, a giant dilemma

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK
      6
      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.
    • dskeithbuckD

      Copying All Compatible Properties from One Object to Another?

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python s22
      6
      0 Votes
      6 Posts
      2k 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.
    • B

      Global Variable doesn't work on CoreMessage?

      Watching Ignoring Scheduled Pinned Locked Moved 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.
    • SwinnS

      Copy Material with Current State to Object

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      5
      0 Votes
      5 Posts
      1k Views
      SwinnS
      Got it. Thanks, again, zipit for you answer.
    • B

      Access Class B's function inside Class A?

      Watching Ignoring Scheduled Pinned Locked Moved General Talk r21 python
      5
      0 Votes
      5 Posts
      1k 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!
    • B

      Treeview Creates An Extra Column?

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK r21 python
      3
      0 Votes
      3 Posts
      450 Views
      B
      @m_adam Thanks! Works as expected
    • ferdinandF

      Scope of the hashes returned by C4DAtom.FindUniqueID(c4d.MAXON_CREATOR_ID)

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK r21 python windows
      5
      0 Votes
      5 Posts
      2k Views
      ferdinandF
      Hi, thanks, that answers all my questions. Cheers, zipit
    • M

      Is it possible to get a spline wrap object to use a python generated spline?

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      8
      1 Votes
      8 Posts
      2k Views
      r_giganteR
      Thanks @moGRR for reaching out us. With regard to your question, as pointed out by @zipit, it's not possible to have a Python Generator to generate object which can be recognized as real spline by generators/deformers expecting a spline as input due to the Python Generator flags used in its registration. Beside the option mentioned by @zipit I also invite to have a look at this post where it's presented a generator outputting spline and accepting splines as input. Best, R
    • V

      Question about IDs for Python Dialog

      Watching Ignoring Scheduled Pinned Locked Moved General Talk python
      3
      0 Votes
      3 Posts
      682 Views
      ManuelM
      hi, I'll set this thread as solved without feedback from your side. Cheers, Manuel
    • B

      Create Proper Hierarchical Data for TreeView?

      Watching Ignoring Scheduled Pinned Locked Moved General Talk r21 python
      11
      0 Votes
      11 Posts
      2k Views
      B
      Thanks for the clarification. Have a great day ahead!
    • fwilleke80F

      ShaderEffector: IsDirty(DIRTYFLAGS::DATA) always true?

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK c++ python r21 maxon api
      5
      0 Votes
      5 Posts
      645 Views
      M
      Hi @fwilleke80, unfortunately, I confirm the shader effect is almost always dirty. I don't have any real workaround maybe you can retrieve all noises and compute their dirtiness, but this is indeed a very hard topic to handle all cases because you will also need to handle the actual parameter of the shader effector itself. Cheers, Maxime.
    • B

      Unexpected ShowPopUpDialog Behavior

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK r21 python
      3
      0 Votes
      3 Posts
      365 Views
      B
      @zipit Thanks for the response. You are right. It should have worked if there is padding between buttons. For now, I just chose either buttonData["w"] or buttonData["h"]. And it works as expected. RE: hard to read your code due to the lack of documentation and its disregard of PEP8 Sorry about that.