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
    • Login
    1. Maxon Developers Forum
    2. kng_ito
    3. Posts
    K
    Offline
    • Profile
    • Following 1
    • Followers 0
    • Topics 22
    • Posts 46
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: How to access animation tracks for a GraphNode in a capsule

      Hi @ferdinand ,
      Thank you for your detailed answer. I will look into the details and try to understand the concepts.
      For now the issue is solved.
      Thank you as always.

      posted in Cinema 4D SDK
      K
      kng_ito
    • How to access animation tracks for a GraphNode in a capsule

      Hi,
      I don't see how to access the animation track for a node in a node-based object such as Particle Node Modifier and Distribution object.
      I've seen several examples of obtaining tracks for nodes in a Redshift material, and it seems possible to access them using NodeMaterial.GetBaseListForNode. However, this is for materials and cannot be applied to capsules.
      Similarly, I assume that obtaining the BaseList2D linked to the GraphNode would allow access to the animation track, but how can this be achieved?
      If anyone knows how to do this, it would be appreciated.
      Thank you.

      posted in Cinema 4D SDK 2026 python
      K
      kng_ito
    • RE: Expose material node inputs to material attributes

      Hi @ferdinand ,

      Thanks for the clarification.
      I will contact user support and request this as a feature.

      posted in General Talk
      K
      kng_ito
    • Expose material node inputs to material attributes

      Hi,

      I wonder if there is a way to pull up the material root inputs so that I can change the values without having to open the node editor.
      In the case of Scene Nodes objects such as Nodes Mesh, simply create an IO-type node and it will appear in the “Inputs” tab of the Attirbute Manager. However, this does not seem to be the case with Redshift Materials.
      And I found that Substance 3D Matrials in the Asset Browser have the Inputs tab that controls the material values.
      So I thought it would be possible to setup the Standard RS Material like so.

      Any help would be appreciated.

      posted in General Talk off-topic-question
      K
      kng_ito
    • RE: Detect error-causing nodes in XPresso

      Hi @i_mazlov ,

      Unfortunately, the python node approach is not effective for my use case, so I may have to emulate the error conditions on my own for each node.
      In any case, thank you for your answer.

      posted in Cinema 4D SDK
      K
      kng_ito
    • Detect error-causing nodes in XPresso

      Hi,
      I am trying to write a python script that detects error-occuring nodes in XPresso.
      It seems that there is a method GvNodeMaster.Execute() for checking if the node master is including error node, and returns the type of error.
      However, I tried with an xpresso network with a Math node that divides by zero and an unlinked Obejct node and did not get the expected results.
      Code:

      import c4d
      
      def main() -> None:
          xpresso_tag = op.GetTag(c4d.Texpresso)
          master = xpresso_tag.GetNodeMaster()
          print(master.Execute())
      
      if __name__ == '__main__':
          main()
      

      2fec6ecd-a55d-43b1-954c-700c9bce9d85-image.png

      Result:

      0
      

      I was expecting c4d.GV_CALC_ERR_DIVISION_BY_ZERO which is 10 or c4d.GV_CALC_ERR_UNDEFINED which is 2.
      Am I doing something wrong? Any help would be appreciated.

      posted in Cinema 4D SDK python
      K
      kng_ito
    • RE: GeUserArea.GetDragObject() for xpresso node

      Thanks for the clarification and the C++ example!
      I'll try to think of other ways.

      posted in Cinema 4D SDK
      K
      kng_ito
    • GeUserArea.GetDragObject() for xpresso node

      Hi,
      I am working on drag and drop operation of UserArea.
      What I would like to do is replicate the behavior of adding a node in the XPresso Editor: drag the text of the node name in the X-Pool and drop it into the node graph, and a new node will be created.

      For UserArea, there is GetDragObject() to get the dragged information, and an example of its use is shown in this thread.
      However, using this method to drag an xpresso node name from X-Pool to the UserArea returns the following results.

      {'type': 400007002, 'object': None}
      

      400007002 is c4d.DRAGTYPE_GVNODE_STORE, so we know that something related to the XPresso node is being dragged, but 'object' is None, so we cannot identify which node is being dragged.
      Hopefully there is a way to get the specific value of the dragged node (e.g. c4d.ID_OPERATOR_BITMAP).

      Any help would be greatly appreciated.

      posted in Cinema 4D SDK python
      K
      kng_ito
    • RE: HOW TO Turn off the auto tangent checkbox on keyframes using python API

      Hi,
      These can be used for doing so.

      CKey.ChangeNBit(c4d.NBIT_CKEY_AUTO, False)
      CKey.ChangeNBit(c4d.NBIT_CKEY_REMOVEOVERSHOOT, False)
      

      By the way, if you want to get correct value of tangents, CCurve.GetTangents() should work correctly, instead of using CKey.GetTimeLeft, etc.

      posted in Cinema 4D SDK
      K
      kng_ito
    • RE: How to access the "root" Scene Nodes graph

      Hi @ferdinand ,
      Thanks as always for your clear answers, It solved the problem for me!

      posted in Cinema 4D SDK
      K
      kng_ito
    • How to access the "root" Scene Nodes graph

      Hi,

      I am trying to access some nodes in Scene Nodes graph with python.
      For node-based objects like Nodes Modifier, I can use BaseList2D.GetNimbusRef() to access the graph, but I don't know how to get into the "root" Scene Nodes graph. Is there an invisible BaseList2D that holds the root Scene Nodes graph and I can use the same way from that object?

      The code below is how I did it for node-based objects to access their nodes. I hope there is a way to access the root Scene Nodes graph in a similar way.

      import maxon
      
      def main():
          nbr = op.GetNimbusRef("net.maxon.neutron.nodespace")
          graph = nbr.GetGraph()
          root = graph.GetRoot()
          
          # Iterate over the direct children of the graph root.
          nodesList = []
          root.GetChildren(nodesList, maxon.NODE_KIND.NODE)
          for node in nodesList:
              print(node)
              
      if __name__ == '__main__':
          main()
      
      

      I would appreciate any examples or tips you could give me. Thank you.

      posted in Cinema 4D SDK python 2024
      K
      kng_ito
    • RE: How to get only tracks displayed in timeline User Mode

      Hi @ferdinand ,

      Thank you for clarifying. I needed a solution for my tool to determine which track/key is displayed&selected.
      But if I can't do that in user mode, I'll make sure my tools don't work when the timeline is in user mode.

      posted in Cinema 4D SDK
      K
      kng_ito
    • How to get only tracks displayed in timeline User Mode

      Hi,

      I would like to know how to check if CTrack is shown/hidden in User Mode of timeline.
      I usually use GeListNode.GetNBit() to check the status of CTrack on timeline, such as selected or hidden.
      NBIT_TL1_HIDE is the one for checking if the element is hidden on the main timeline, but not for tracks that are hidden on the User Mode timeline.

      Does anyone know of any way to do this?

      posted in Cinema 4D SDK python 2024
      K
      kng_ito
    • What does "Puffy Unicorn Reset" command do in 2024.1.0?

      Hi,

      I found some unfamiliar commands in the Extensions menu of 2024.1.0. Are they displayed unintentionally?
      If they are for users, I would like to know how they work.

      191facd3-630f-49ac-9cb9-d77de4a79bf8-image.png

      posted in General Talk
      K
      kng_ito
    • RE: Python-Generated Splines are not recognized by Cloner Object

      hi @i_mazlov ,

      I understand that it is not supported, so I will use Scene Nodes to generate the spline this time.
      No other questions, thank you very much.

      posted in Cinema 4D SDK
      K
      kng_ito
    • Python-Generated Splines are not recognized by Cloner Object

      Hi,

      I have a Python Generator Object that returns a Spline Object. I want to use this spline for the distribution of a Cloner Object, but it does not generate any clones on the spline.
      The spline works fine when used for Generators such as Sweep, Extrude, Loft etc.

      The Python Generator Code:

      import c4d
      
      def main():
          spline = c4d.SplineObject(pcnt=4, type=c4d.SPLINETYPE_LINEAR)
      
          spline.ResizeObject(pcnt=4, scnt=1)
      
          spline.SetPoint(id=0, pos=c4d.Vector(0, 0, 0))
          spline.SetPoint(id=1, pos=c4d.Vector(100, 100, 100))
          spline.SetPoint(id=2, pos=c4d.Vector(200, 200, 200))
          spline.SetPoint(id=3, pos=c4d.Vector(300, 300, 300))
      
          spline.SetSegment(id=0, cnt=4, closed=False)
      
          spline.Message(type=c4d.MSG_UPDATE)
      
          return spline
      

      The Scene File:
      PyGenSplineAndCloner.c4d

      I would appriciate it if you could check to see if it is a bug or I am missing somthing in the code.

      posted in Cinema 4D SDK python 2023
      K
      kng_ito
    • RE: Limit the destination of UserArea.HandleMouseDrag()

      Hi @m_adam,

      Sorry for the delay in responding.
      Yes, the problem has been resolved.

      posted in Cinema 4D SDK
      K
      kng_ito
    • Limit the destination of UserArea.HandleMouseDrag()

      Hi,

      I am drawing an object as a node in UserArea and I want to drag that object only to the InExclude list (Attribute Manager).
      The problem is that when I use HandleMouseDrag(), I can also drag to the Object Manager and that object will be duplicated unintentionally.
      So I need to know how to restrict dragging to the object manager and only allow dragging to the Attribute Manager.

      Any help would be appreciated.

      posted in Cinema 4D SDK 2023 python
      K
      kng_ito
    • How to dynamically hide parameters

      Hi,

      I am trying to control which parameters of ObjectPlugin are shown/hidden depending on the values of another parameter.
      For example, the Cloner object switches which parameters it displays depending on its "mode" parameter.
      Cinema 4D 2023-1-3 - [Untitled 3 _] - Main 2023-03-29 18-40-43.gif

      From the other threads I see that overriding GetDDescription() is the key to achieving this, but I just can't get it to work.

      Any help would be appreciated.

      posted in Cinema 4D SDK python 2023
      K
      kng_ito
    • RE: How to get weights from a Vertex Map tag on an uneditable object

      Hi @Manuel ,
      Sorry for asking a question that has already been resolved in another thread.
      That thread solved my question. Thank you.

      posted in Cinema 4D SDK
      K
      kng_ito