Redshift constants

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: [email protected]$ZuPt9nFg_F5ugGNq<com.redshift3d.redshift4c4d.nodes.core.bumpmap.inputtype"
    How to translate that to a value of 0, 1 or 2?

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

Thanks again.

What about the second question?

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

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 [email protected]$ZuPt9nFg_F5ugGNq<com.redshift3d.redshift4c4d.nodes.core.bumpmap.inputtype the symbol < correspond to the InputList

Cheers,
Manuel

Ok, clear now. Thanks.