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. annoyedUser
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 4
    • Best 0
    • Controversial 0
    • Groups 0

    annoyedUser

    @annoyedUser

    0
    Reputation
    3
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    annoyedUser Unfollow Follow

    Latest posts made by annoyedUser

    • RE: Script to change parameters across all similar nodes material

      okay the docs you gave were great for insight

      working code to change parameter of roughness for x given mat selections

      import c4d
      import maxon
      from maxon import GraphDescription
      
      doc = c4d.documents.GetActiveDocument()
      
      # Get selected materials directly
      selected_materials = doc.GetActiveMaterials()
      
      # Modify roughness for each selected material
      for material in selected_materials:
          graph = GraphDescription.GetGraph(material, 
                                            nodeSpaceId=maxon.NodeSpaceIdentifiers.RedshiftMaterial)
          
          GraphDescription.ApplyDescription(graph, {
              "$query": {
                  "$type": "Standard Material"
              },
              "Reflection/Roughness": 1
          })
      
      c4d.EventAdd()
      
      posted in Cinema 4D SDK
      A
      annoyedUser
    • Script to change parameters across all similar nodes material

      Hi, I want to change all settings of thickness in Contour node of all toon materials?
      Any idea of how to do this?
      thanks

      import c4d
      from c4d import gui
      
      def traverse_nodes(graph, ext_value, int_value):
          """Recursively search nodes in a graph."""
          for node in graph.GetNodes():
              try:
                  node_id = node.GetDefinition().GetID()
              except:
                  node_id = None
      
              # Look for the RS Contour node by its ID string
              if node_id == "com.redshift3d.redshift4c4d.nodes.core.contour":
                  print(f"✅ Found Contour node in: {node.GetName()}")
                  node.SetParameter("com.redshift3d.redshift4c4d.nodes.core.contour.externalthickness", ext_value, c4d.DESCFLAGS_SET_0)
                  node.SetParameter("com.redshift3d.redshift4c4d.nodes.core.contour.internalthickness", int_value, c4d.DESCFLAGS_SET_0)
      
              # Check if the node contains subgraphs
              for port in node.GetInputs() + node.GetOutputs():
                  subgraph = port.GetNodeGraph()
                  if subgraph:
                      traverse_nodes(subgraph, ext_value, int_value)
      
      def main():
          # Get user values
          ext_str = gui.InputDialog("External Thickness", "1.0")
          int_str = gui.InputDialog("Internal Thickness", "1.0")
      
          try:
              ext_value = float(ext_str)
              int_value = float(int_str)
          except ValueError:
              gui.MessageDialog("Invalid number input.")
              return
      
          # Loop through all materials
          for mat in doc.GetMaterials():
              if not mat.CheckType(1036224):  # Redshift material
                  continue
      
              node_material = mat.GetNodeMaterialReference()
              if not node_material:
                  continue
      
              # Try all available graphs inside the material
              graphs = node_material.GetGraphs()
              if not graphs:
                  continue
      
              print(f"Scanning material: {mat.GetName()}")
      
              for graph in graphs:
                  traverse_nodes(graph, ext_value, int_value)
      
          c4d.EventAdd()
      
      if __name__ == "__main__":
          main()
      
      
      posted in Cinema 4D SDK 2025 python
      A
      annoyedUser
    • RE: Loop tool and knife tool are useless in R2025, revert back to R23

      It is not a a support centre issue, it is a dev issue.

      The devs changed the algothrims for the tools. The screenshots above clearly show the issues of which the dev team have caused.

      Support do not have answers for this, they would just point to documentation.

      This is a dev issues, as it is the devs who made the changes.

      posted in General Talk
      A
      annoyedUser
    • Loop tool and knife tool are useless in R2025, revert back to R23

      Please see the screenshots below which show case the issues.
      Loop tool and knife tool are useless in R2025, revert back to R23
      Why have Maxon changed what used to work.

      alt text
      alt text

      posted in General Talk chit-chat programming learning-resource
      A
      annoyedUser