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

    Redshift constants

    Cinema 4D SDK
    2023 python
    4
    7
    1.4k
    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.
    • P
      pim
      last edited by pim

      I have a RS Bump Node and want to change the "Input Map Type"

      25581079-acda-4473-ac03-a1b8e5209152-image.png

      I do this with the following code:

      bumpInputMapTypePort = bumpNode.GetInputs().FindChild("com.redshift3d.redshift4c4d.nodes.core.bumpmap.inputtype")
      bumpInputMapTypePort.SetDefaultValue(1)
      print ("bumpInputMapTypePort: ", bumpInputMapTypePort)  
      

      Questions.

      • how to find the Redshift constant for the possible values.
        Now I just use 0,1 and 2

      • in the console I get the following output:
        "bumpInputMapTypePort: bumpmap@YfaEK$ZuPt9nFg_F5ugGNq<com.redshift3d.redshift4c4d.nodes.core.bumpmap.inputtype"
        How to translate that to a value of 0, 1 or 2?

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        Hi,

        Redshift IDs are not available as symbols.
        We have differents ways to find those IDs. One is to display them in the palette info. You can activate the option in the node editor preferences.

        The best way to understand how the UI of is composed of is to use the Resource Editor. You can launch it through the Command Manager (shift + C) and type resou

        Once you are in the resource editor you can click this icon and start typing the ID of the node you are looking for. This will reduce the database to only the one that contain a node with this ID. (here typing bump)

        0654afa5-4923-48bc-85fc-fdb2d5f65ab0-image.png

        On the left you have the port list and you can find the port 'Input Map Type'. If you select it, you can find the enum list and the value waited.
        5fb470e9-591b-4dc7-bc8a-bf0ce6771b3c-image.png

        each entry that a string attached to it
        f39e8ded-3bc6-412a-857c-756befb64288-image.png

        Another way of finding IDs and value, you can Copy a node and paste it in a text editor, the json version of the node will be pasted. The port's value will only be displayed if you changed the value.
        530b4310-25c7-4416-a026-ef1241dd5576-image.png
        The last one is to add the value you want to define as an input port for the node and select it. Information will be displayed in the info palette like its ID, DataType, and value.

        74cba6ad-b06e-4076-92cc-57e30654baff-image.png

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 1
        • P
          pim
          last edited by

          Thanks again.

          What about the second question?

          • in the console I get the following output:
            "bumpInputMapTypePort: bumpmap@YfaEK$ZuPt9nFg_F5ugGNq<com.redshift3d.redshift4c4d.nodes.core.bumpmap.inputtype"
            How to translate that to a value of 0, 1 or 2?
          ManuelM 1 Reply Last reply Reply Quote 0
          • ManuelM
            Manuel @pim
            last edited by

            hi,

            oupss sorry, when you print a GraphNode, the path of the node is printed out. If you want its value, you must use GetDefaultValue().

            Int the following path bumpmap@YfaEK$ZuPt9nFg_F5ugGNq<com.redshift3d.redshift4c4d.nodes.core.bumpmap.inputtype the symbol < correspond to the InputList

            Cheers,
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • P
              pim
              last edited by

              Ok, clear now. Thanks.

              1 Reply Last reply Reply Quote 0
              • F
                fastrube
                last edited by

                Hey @pim, did you figure out how to set the bumpmap inputtype?
                I can't get it to work.

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

                  Hey @fastrube,

                  The bump map type is an integer value as explained above by @Manuel and as explained here in a bit more verbose form in the graph description manual.

                  Cheers,
                  Ferdinand

                  MAXON SDK Specialist
                  developers.maxon.net

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