The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.
  • String values for the "FindChild"?

    python r25
    13
    0 Votes
    13 Posts
    1k Views
    B
    @Manuel Gotcha. Thanks for the clarification. Sorry for the trouble. Works as expected. Will close this thread now.
  • Set c4d.InExcludeData() has something didn't expect.

    s26 python windows
    3
    0 Votes
    3 Posts
    471 Views
    DunhouD
    @ferdinand Thanks for that solution. It's happy to hear that , I do try to make win-win clear post as I can to don't waste our time , hope it's a worthy work I tested the new GetUpdatedInexcludeData function , it worked well , The "click twice" thing never happen again . It's the None condition I didn't realize before . It does happend when no or single object in the list . And for the "odd place" and the "exception ", it is a test to make sure all the things above work well( after that are all the settings ) . I forgot move to the right place . sorry to that Thanks for the caring code for c4d.utils.DegToRad(360) , I haven't notice this before and just stupid import radians
  • How to select directories in a CUSTOMGUI_FILENAME?

    s26 python
    3
    0 Votes
    3 Posts
    727 Views
    P
    Hi @ferdinand , Thanks a lot, that's exactly what I was looking for ! flags: c4d.BaseContainer = c4d.BaseContainer() flags[c4d.FILENAME_DIRECTORY] = True # Add a CUSTOMGUI_FILENAME with our flags settings. self.AddCustomGui(id=MyDialog.ID_FILENAME, pluginid=c4d.CUSTOMGUI_FILENAME, name="Path", flags=c4d.BFH_SCALEFIT, minw=0, minh=0, customdata=flags)
  • Plug-in running fine on one OS but not another

    windows sdk
    13
    1
    0 Votes
    13 Posts
    2k Views
    Y
    @ferdinand Yes. it's solved. Thank you.
  • ActiveObjectManager_SetObject to display BaseObject in a GetListHead

    c++ sdk
    2
    0 Votes
    2 Posts
    430 Views
    ferdinandF
    Hello @kbar, Thank you for reaching out to us. This is a tricky one to answer, and my first instinct was that this is not too surprising due to what you do with your GeListHead, but the devil lies in the detail. In general, I would say that the safest route would be the one many of our implementations take: Displaying elements that are not part of the "standardized" branches of a scene graph via a DescriptionCustomGui wrapped by a custom GUI of yours which is part of a description of a (set of) node type(s) you provide. The FieldList data type/GUI does this for example. Overview Simply adding a custom branch in form of a GeListHead to a node of your choice will not make this custom branch discoverable via BranchInfo. This is because there is hard-coded data in the Cinema 4D core for this branch discovery. You can of course manually traverse the branches of your node. In the Attribute Manager SetObject implementation, this hardcoded branch structure is not being checked directly as far as I can see, but the Attribute Manger modes rely implicitly on it. You can register new Attribute Manger modes with ActiveObjectManager_RegisterMode which binds than that mode to a hook as for example shown in [1] (for materials in this case), see the MESSAGEHOOK documentation for details. It shows the case for tags as used internally. The object mode case is much more complex, but it will effectively fail on AOM_MSG_GETATOMLIST in your scene setup because the traversal done there assumes objects to appear in "object " branches only - which is not true in your case. Solutions I personally would still consider the DescriptionCustomGui route the safest way, especially because the GUI has the DESCRIPTION_OBJECTSNOTINDOC flag which allows you to also display orphaned nodes. Implement your custom attribute manager mode, which can deal with your custom scene traversal structure and mark your nodes with NBIT_ACTIVE so that the hook can find them. Regarding Xpresso nodes: They have their own branches which are respected in the AM implementation. As a warning: There are also quite a few hacks in the AM for Nodes API and shader nodes, especially regarding the traversal. In general, I would consider this non-regular scene structure of yours a problem with the AM because of how often Cinema 4D internally relies on a specific makeup of branches. It could very well be that you implement your AM mode, and everything will then work fine, but I cannot guarantee that. Which is a further point why I personally would gravitate towards the first solution. Cheers, Ferdinand [1]: static GeData MaterialMessageHook(const BaseContainer &msg, void *data) { switch (msg.GetId()) { case AOM_MSG_ISENABLED: return true; case AOM_MSG_GETATOMLIST: { BaseDocument *doc = GetActiveDocument(); if (!doc) break; doc->GetActiveMaterials(*((AtomArray*)data)); return true; } break; } return false; }
  • Can i get global input event ?

    python s26
    3
    0 Votes
    3 Posts
    401 Views
    gheyretG
    @ferdinand Wow~ Thank you so much bro
  • Get Node By Name?

    r25 python
    3
    0 Votes
    3 Posts
    356 Views
    B
    @Manuel Ah gotcha. It's only available R26 onwards. That's why I can't see something related in my R25 documentation.
  • Get asset from asset browser python

    python
    5
    0 Votes
    5 Posts
    1k Views
    K
    @ferdinand Thanks a lot Ferdinand for this detailed and complete answer! This is exactly what I hoped to do! I tested the code and it works great! Since a few of the fixes you use are not recommended, i will solve it in another way for now, until it gets fixed for python, or i switch to C++. I got my plugin doing what i want, for the moment. Pretty sure this will also help someone else in the future. Have a nice day!
  • Iterate through all Inputs and Outputs of a Given Node?

    r25 python
    5
    0 Votes
    5 Posts
    564 Views
    B
    @manuel ah gotcha. the node kinda. thanks. will close this thread for now.
  • Project Tool Stops At Non-Existent Path

    project tool sdk
    4
    1
    0 Votes
    4 Posts
    1k Views
    M
    Hi @Yakuza just in case you do have space in your Cinema 4D space, so the projectool don't understand clearly your input so you need to escape it by adding "" so something like: kernel_app_64bit.exe g_updateproject="D:\MAXON_CODE\Maxon Cinema 4D 2023_CODE\sdk" Cheers, Maxime.
  • Undo for InsertUnder() is not right. Why?

    python
    4
    4
    0 Votes
    4 Posts
    795 Views
    ferdinandF
    Thanks! Sorry, I am so careless that I ignore the message "Needs to be called before the change.". No worries, you are not the first one who trips over Undo call order, including myself at some point
  • Python. Cinema4d. All iterations in the Text value

    9
    2
    0 Votes
    9 Posts
    1k Views
    S
    @ferdinand thx very much! ill save this
  • create_nodematerial.py from Github not working

    r25
    5
    0 Votes
    5 Posts
    603 Views
    M
    Hi @bentraje I think there was a small misscommunication what was fixed on Github was the fact that the file does not contain the information of which Cinema 4D version they are working. We are not going to adapt our GitHub script to make it work for R25. If you want code that is going to work for R25, the only solution is to download the python SDK for R25. Cheers, Maxime.
  • Sample Code for Connecting Ports/Nodes?

    r25 python
    4
    1
    0 Votes
    4 Posts
    464 Views
    ManuelM
    hi, There are no particular reasons. Muting a connection is less intuitive than connect two nodes. If there was a function like Connect to mute the connexion, we would not have created that example neither. Cheers, Manuel
  • older documentation links?

    r25 python
    3
    0 Votes
    3 Posts
    349 Views
    B
    @fwilleke80 Gotcha thanks for the confirmation. So I guess they don't host it online? But man they are already using sphinx. They can easily have a button to switch to previous versions. But oh well.
  • Access Spline Field Parameters with XPresso

    python s26
    3
    0 Votes
    3 Posts
    786 Views
    I
    Thank you for the elaborate reply, it worked! (And helped me to better understand the desc id system)
  • Priority Delay on Stacking Skin Deformers

    r21 python
    16
    0 Votes
    16 Posts
    2k Views
    B
    Hi, Just checking if this is now resolved in the current version of C4D (2023).
  • Is it possible to change active view?

    python
    2
    0 Votes
    2 Posts
    561 Views
    ferdinandF
    Hello @lingza, Thank you for reaching out to us. In short, what you want to do is unfortunately not possible. To unpack things a bit, I understood your question as such that you have multiple view panels in your layout and each view panel contains multiple views. The screen below shows two view panels with four views each for example. [image: 1665048050441-screenshot-2022-10-06-at-11.20.38.png] You then want to toggle a view panel from showing all its views (depending on the panel layout) to singular one, e.g., "minimize and maximize" the Perspective view in the second panel. For that you wanted to use c4d.CallCommand(13640) and therefore need to set the active view (the view with the grey border). Internally, there is a non-public method called BaseDocument::SetActiveView which handles setting the selected viewport and one has more or less all tools in the Python SDK to replicate it (you more or less just have to set BIT_ACTIVE and send some messages). And while doing this will have some effect on the selection state of viewports, it will not be identical to what you can achieve with mouse interactions, and running then your CallCommand(13640) on such 'semi-selected' viewport will not have the desired effect. In the end, the viewport selection state is bound to a very specific call chain in our internal API. Which is probably the reason why the method BaseDocument::SetActiveView remains non-public. FYI: This is not a Python issue, the same applies to C++, I tried it there too, to the same effect. Cheers, Ferdinand
  • GetSplinePoint REVERSE

    python
    3
    1
    0 Votes
    3 Posts
    825 Views
    Caleidos4DC
    Thanks ferdinand I will treasure your help. Thank you very much!
  • Material and Shader Questions

    python s26
    3
    0 Votes
    3 Posts
    433 Views
    gheyretG
    @m_adam OK~ Thank you so much!