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
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. momoko
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 14
    • Best 0
    • Controversial 0
    • Groups 0

    momoko

    @momoko

    0
    Reputation
    7
    Profile views
    14
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    momoko Unfollow Follow

    Latest posts made by momoko

    • RE: How to set a custom color for a node?

      @ferdinand You are amazing! Thanks

      posted in Cinema 4D SDK
      M
      momoko
    • RE: How to set a custom color for a node?

      @Dunhou Thank you. Do you know how I can see what kind of values I can set for it?

      posted in Cinema 4D SDK
      M
      momoko
    • RE: How to set a custom color for a node?

      @Dunhou Thanks but I mean the color of the node itself, not the base color

      posted in Cinema 4D SDK
      M
      momoko
    • How to set a custom color for a node?

      It's me again!

      I'm wondering if there is an example to explain how we can use a custom color for a node? the nodes are grey by default but we can change their color

      posted in Cinema 4D SDK python 2024
      M
      momoko
    • RE: How to set the position of a node manually?

      @ferdinand Thank you. I thought that would be possible because Blender was providing that.

      posted in Cinema 4D SDK
      M
      momoko
    • RE: how to set the path of a Textre node manually?

      @ferdinand I found a solution. Sorry

      posted in Cinema 4D SDK
      M
      momoko
    • RE: how to limit the type of files we can import?

      @i_mazlov Thanks for your response! I learnt a lot!

      posted in Cinema 4D SDK
      M
      momoko
    • How to set the position of a node manually?

      Dear people,

      Is there a chance I use a custom value to set the position (location)
      of a node I create with Python manually inside Graph Editor? Like use a custom value for X and Y of a Texture node.

      posted in Cinema 4D SDK python 2024
      M
      momoko
    • how to set the path of a Textre node manually?

      Lovely people,

      Is this a wrong attempt to set the Path of a Texture node manually?

      def create_material(self):
              doc = c4d.documents.GetActiveDocument()
              material = c4d.BaseMaterial(c4d.Mmaterial)
              if not material:
                  raise MemoryError(f"{material = }")
              doc.InsertMaterial(material)
          
              # Get the node material for it and add a graph for the currently active material space to it.
              node_material = material.GetNodeMaterialReference()
              graph = node_material.CreateDefaultGraph(c4d.GetActiveNodeSpaceId())
              if graph.IsNullValue():
                  raise RuntimeError("Could not add graph to material.")
              
              # Start a transaction to modify the graph
              with graph.BeginTransaction() as transaction:
                  # Get texture files from the selected folder
                  texture_files = self.print_allowed_files_in_folder(self.FOLDER_PATH)
          
                  # Add texture nodes to the material graph for each texture file
                  for texture_file in texture_files:
                      texture_node = graph.AddChild(maxon.Id(), maxon.Id("com.redshift3d.redshift4c4d.nodes.core.texturesampler"))
                      if texture_node is None:
                          continue
                      
                      # Set the texture file path
                      path_port = texture_node.GetInputs().FindChild("com.redshift3d.redshift4c4d.nodes.core.texturesampler.tex0").FindChild("path")
                      path_port.SetDefaultValue(maxon.Url("file:///" + texture_file))  # Assuming local file path
          
                      # Connect the texture node to the output node of the material
                      output_port = graph.GetOutputPort(0)  # Get output port of the material
                      texture_color_port = texture_node.GetOutputs().FindChild("com.redshift3d.redshift4c4d.nodes.core.texturesampler.outcolor")
                      texture_color_port.Connect(output_port, modes=maxon.WIRE_MODE.NORMAL, reverse=False)
          
              # Commit the transaction to apply the changes to the graph
              transaction.Commit()
      
      posted in Cinema 4D SDK windows macos python 2024
      M
      momoko
    • How to make static texts bold? Icons?

      Hi guys,

      1- I have a question. How can I make a static text bold? I tried some common methods in Python but they didn't work!

      self.AddStaticText(id=2001, flags=DEFAULT_TEXT_FLAGS, name=static_text)
      

      2- How can I add an icon to a button without using custom icons? Does Cinema4D provide any default icon like Blender?

      self.AddButton(id=3002, flags=c4d.BFH_SCALEFIT, initw=100, name="Button!")
      
      posted in Cinema 4D SDK 2024 python
      M
      momoko