• Howto add a Field input to a python plugin

    Cinema 4D SDK python r19 r20 r21
    3
    0 Votes
    3 Posts
    745 Views
    P
    @s_bach said in Howto add a Field input to a python plugin: FIELDLIST works fine - i think i got an strange error before and trying CUSTOMFIELDLIST etc. solved
  • Error after hitting Undo.

    Cinema 4D SDK r20 python
    13
    0 Votes
    13 Posts
    3k Views
    ManuelM
    @m_magalhaes said in Error after hitting Undo.: i just scratch a bit your code, but i've discovered that with the R21, MCOMMAND_SPLIT only return true. I've opened a bug entry for that. this is fixed in R21.1
  • Mirror a matrix over a defined plane.

    General Talk
    7
    0 Votes
    7 Posts
    2k Views
    D
    @zipit Thank you. That'll help me.
  • ObjectData plugin not rendering to picture viewer

    Moved Cinema 4D SDK
    6
    0 Votes
    6 Posts
    1k Views
    S
    Hello, as now said multiple times, GetActiveDocument() must not be used, but GetDocument() instead. What is the point of your In/Exclude list? Are these the objects you "rotate along the timeline"? This is typically not how a ObjectData object works; it generates objects based on its child objects or deforms objects in its hierarchy. It is not supposed to move arbitrary other objects. As mentioned above, a tag plugin may be the better solution. The "look_at_camera" example show such a plugin rotating its host object. best wishes, Sebastian
  • SendModelingCommand Failing

    Cinema 4D SDK python r21
    9
    0 Votes
    9 Posts
    2k Views
    ManuelM
    hello, I forgot to ask, where are you running those commands ? on a script, a dialogbox, a nodedata ? Thanks for your time trying to isolate the problem. Don't hesitate to send us an heavy scene, we can see why the command isn't working. Cheers, Manuel
  • menu.InsData(, 'CMD') does not work on Tags?

    Cinema 4D SDK r21 python
    4
    0 Votes
    4 Posts
    592 Views
    ManuelM
    hello, without more information from your part, i'll close this thread Cheers, Manuel
  • 0 Votes
    6 Posts
    919 Views
    M
    Oh my, this is horrible ... cheers mogh
  • Keyframing a property using python.

    Moved Cinema 4D SDK
    3
    0 Votes
    3 Posts
    936 Views
    M
    Hi Manual, Thanks for your help! Next time I will use the 'ask question' when posting a question. You code does exactly what I need, much appreciated! Cheers, Martijn
  • Updating ObjectData plugin only on timeline change

    Moved Cinema 4D SDK r20 python
    6
    0 Votes
    6 Posts
    1k Views
    G
    Fantastic, Thank you for the suggestions, ObjectDataOptimizeCache(true) does what I need.
  • Retrieve Center Pivot of Three or More Objects?

    Cinema 4D SDK r21 python
    8
    0 Votes
    8 Posts
    1k Views
    B
    @s_bach Thanks for the response! Works as expected. @zipit No worries. Will close this thread. I will probably revive this a year from now (lol). I have a feeling that Matrix will haunt me again in other aspects so this would be a nice exercise if that happens. Thanks again!
  • Retrieve the Bottom Center Pivot of an Object?

    Cinema 4D SDK r21 python
    5
    0 Votes
    5 Posts
    815 Views
    M
    Hi @bentraje beside zipit said which is indeed correct you may found interesting a plugin I made a long time ago when I started python, which has exactly this purpose but also supports specific objects such as sweep, spline and so on. https://github.com/gr4ph0s/graph_bottom_center_axis/blob/master/bottom_axis_center.pyp Cheers, Maxime.
  • 0 Votes
    4 Posts
    899 Views
    B
    Thanks for the input! It's a shame you can't fiddle with the palettes. I think I'll just do it like x-particles and have a command that loads the palette and the user can dock it himself. Not the most elegant, but gets the job done. Cheers
  • Object plugin hangs when IRR is on

    Cinema 4D SDK python r20
    5
    0 Votes
    5 Posts
    745 Views
    ferdinandF
    Hi, reading this thread one question popped into my mind. You wrote: I create two temporary documents with IsolateObjects(), and after getting the required objects created in the new temporary documents, I KillDocument() both at the end. What do you mean by 'get'? If this means just referencing the objects this might explain your problems, depending on what you are doing with the objects. If you pass the object references as part of the results of your GVO and also free the resources of these temporary documents, you are passing objects that might be dead references at the time of rendering, giving an explanation for your problems. Also: When you just remove the resource freeing of your temporary documents, I do not think that they will be freed automatically by Python's garbage collector. The reason is: While the reference count for these document objects (objects referring here to the Python type) is zero after the scope of GVO has closed (making them candidates for collection) the referenced output objects (here referring to the Cinema type) are still alive and they do reference these document objects. Which would cause your temporary document objects to stay in memory. Which would not be too bad, since it would always be just the two documents and not an incrementally increasing amount, a.k.a a memory leak. Long story short: Clone your objects if you want to pass them as the output and flush the documents afterwards to make things easy for Pythons gc (which is one of the main reasons why Python tends to be bloaty/slow). Cheers zipit
  • Changing CUSTOMGUI_RANGE

    General Talk
    5
    0 Votes
    5 Posts
    1k Views
    r_giganteR
    Hi gsmetzer, with regard the use of the range slide in a resource file please have a look at <Cinema 4D folder>/resource/modules/olod.res: the LOD_BAR parameter is a range slider With regard to using the NodeData::GetDDescription() please check: py-dynamic_parameters_object_r18.pyp py-preference_r19.pyp py-spherify_modifier_r13.pyp Best, Riccardo
  • Setting Parameters from JSON File

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    997 Views
    B
    @m_adam Thanks! Works as expected!
  • CurrentStateToObject returning Null

    Cinema 4D SDK
    10
    0 Votes
    10 Posts
    1k Views
    ManuelM
    hello @rui_mac without futher information i'll change this thread as resolved tomorrow.
  • 0 Votes
    11 Posts
    2k Views
    H
    I know this is an old topic, but just for the record... The same thing seems to happen on macOS as well (Cinema 4D R21.207, macOS Catalina 10.15.3). If xpos and ypos are -2 (i.e. show the dialog in the middle of the screen), and pluginID is not given as parameter, the dialog dimensions are about half of what they're supposed to be. If a pluginID is given, dialog dimensions are correct.
  • Restrict Input Dialog to Numbers?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    473 Views
    B
    Hi @m_adam Thank you for reference. It works as expected. Have a great day ahead!
  • Issues Modifying Cloned Document

    Cinema 4D SDK python r21
    3
    0 Votes
    3 Posts
    642 Views
    ManuelM
    Hello, Really sorry about this issue. Would it be possible to send us a scene and some screenshot maybe to reproduce the behaviour ? That would be really appreciate. I will send that to our devs. You can use our mailbox [email protected] Thanks and cheers, Manuel
  • 0 Votes
    5 Posts
    789 Views
    B
    @m_adam RE: The A seems to be present until there is a target. Thanks for the clarification. That make sense. Your code works as expected. This is just a trivial question. In the documentation for the CAPoseMorphTag.ExitEdit it says: Must be called before doing anything to a morph tag. Shouldn't it be named EnderEdit? Since we are editing the morph tag or calling the ExitEdit after actually editing the morph tag? Again trivial but just seeking some clarification.