Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. kng_ito
    K
    • Profile
    • Following 1
    • Followers 0
    • Topics 21
    • Posts 44
    • Best 1
    • Controversial 0
    • Groups 0

    kng_ito

    @kng_ito

    1
    Reputation
    47
    Profile views
    44
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    kng_ito Unfollow Follow

    Best posts made by 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

    Latest posts made by 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