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
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. karen
    3. Topics
    K
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 7
    • Groups 0

    Topics

    • K

      Is there anyway to get/set the Place tool?

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK programming
      2
      1
      0 Votes
      2 Posts
      425 Views
      M
      Hi sadly this is not possible. I've reached to responsible team to make them aware about it. Cheers, Maxime.
    • K

      Is there any way to trriger the GraphNode "Add Layer" button with Python?

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK 2024 windows python
      4
      1
      0 Votes
      4 Posts
      729 Views
      K
      I found the AddPorts() Method,Sorry I missed it before. from typing import Optional import c4d import maxon doc: c4d.documents.BaseDocument # The active document op: Optional[c4d.BaseObject] # The active object, None if unselected def main() -> None: material = doc.GetActiveMaterial() nodeMaterial = material.GetNodeMaterialReference() graph: maxon.GraphModelInterface = nodeMaterial.GetGraph(c4d.GetActiveNodeSpaceId()) with graph.BeginTransaction() as transaction: layered_node = graph.AddChild(maxon.Id(),"com.chaos.vray_node.texlayeredmax") layers = layered_node.GetInputs().FindChild("com.chaos.vray_node.texlayeredmax.texture_layers") #The Layers portbundle layers.AddPorts(2, 1) #Add layers transaction.Commit() #Layer in Layers portbundle layers_list = [] layers.GetChildren(layers_list,maxon.NODE_KIND.INPORT) #Textureports and BlendMode_ports in Layers portbundle layers_texport_list = [tport for port in layers_list if (tport := port.FindChild("com.chaos.vray.portbundle.texture_layer.texture"))] layers_mode_list = [mport for port in layers_list if (mport := port.FindChild("com.chaos.vray.portbundle.texture_layer.blend_mode"))] print(layered_node) print(layers) print(layers_list) print(layers_texport_list) print(layers_mode_list) if __name__ == '__main__': main()