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
    • Register
    • Login

    Creating custom asset nodes via Python API

    Scheduled Pinned Locked Moved Cinema 4D SDK
    2026pythonwindows
    2 Posts 2 Posters 45 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I Offline
      itstanthony
      last edited by

      Hey folks,

      I'm working on a Python script to automate Redshift AOV setups in C4D 2026. Everything works fine with standard RS nodes (Store Color To AOV, Bump Maps, etc.) using GraphDescription.ApplyDescription().

      However, I'm stuck with a custom node I created and saved to the Asset Browser called "Normal Blender AOV". I can drag it into the Node Editor manually, but I can't figure out how to instantiate it programmatically via Python.

      Here's what the node looks like:
      alt text

      The Node Editor shows these IDs:

      • Asset ID: 76fe7ff03ad648d0b63ba1bb0bb05157@b905183b22b84cbe8793eec9029494c6
      • Instance ID (when created): 76fe7ff03ad648d0b63ba1bb0bb05157@BIWmc46OMVztmLGP18FR9_

      I've tried using these IDs in different ways:

      # Attempt 1: Using asset ID as type
      create_setup = {
          "NormalBlenderAOV": {
              "$type": "76fe7ff03ad648d0b63ba1bb0bb05157@b905183b22b84cbe8793eec9029494c6"
          }
      }
      maxon.GraphDescription.ApplyDescription(graph, create_setup)
      # Missing node type declaration
      
      # Attempt 2: With asset: prefix
      # Same error
      
      # Attempt 3: Using base ID only (before @)
      # Same error
      

      The node exists in my Asset Browser and I can use it manually, but I'd like to dynamically instantiate it from the script (similar to how the script creates other Redshift nodes).

      Right now my workaround is to detect if the node already exists in the material and connect to it, which works fine. But I'd love to be able to create it programmatically from the Asset Browser.

      Is there a way to instantiate custom Asset Browser nodes via Python in Redshift material graphs? If anyone has experience with this, I'd really appreciate any guidance.

      Thanks!
      Anthony

      Setup: Cinema 4D 2026.1, Redshift 2026.2.1

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF Offline
        ferdinand @itstanthony
        last edited by ferdinand

        Hey @itstanthony,

        Thank you for reaching out to us and sorry, I am somehow overlooked this topic. It is rather hard for me to reproduce what you did there since I am lacking that asset of yours. I understand that the nodes API in total but also its simplified variant of graph descriptions are not trivial, but I would recommend having a look at Graph Descriptions: Referencing Entities, it is all explained there.

        • You can either reference entities by their human readable name (English only at the moment) or by their ID.
        • When you use an ID reference, you must use the hashtag prefix so that the graph description parser knows that it is meant to be an ID. E.g., #com.maxon.nodes.stuff or #2348twiugrfjwsgrrwo4.
        • You can also use lazy references but I won't get into that here.

        So, you either must prefix the ID with a hashtag or you can just use the plain name of your node which seems to be "Normal Blender AOV". The danger with names is always, especially for user designed nodes, that there will be a name collision. Graph descriptions work by building a cache of IDs and labels right in a node space right before the description is executed. It does not matter if a node is native or not.

        The alure of graph descriptions is of course to use human readable identifiers. I would recommend naming custom nodes with a prefix to make name collisions less likely. E.g. instead of naming a node "Normal Blender", one could name it "MXN Normal Blender" where "MXN would stand for Maxon and would have to be customized to your company/name.

        Cheers,
        Ferdinand

        Example

        I created a Redshift node asset called "DoubleNoise":
        c5f80076-9856-4862-a45a-93f7c96d0973-image.png

        And then instantiated it like this. You can also access the ports just like for builtin nodes via their human readable name.

        import math
        import maxon
        from maxon import GraphDescription
        
        GraphDescription.ApplyDescription(
            GraphDescription.GetGraph(name="foo"), {
                    GraphDescription.Type: "DoubleNoise",
            }
        )
        

        035fcdc3-9886-448d-8be3-5f762ee3608d-image.png

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • First post
          Last post