Environment:
Cinema 4D 2024.2.0
Redshift 3.5.24
Material Type: RS Shader Graph (TypeID:1036224)
Problem:
I'm developing a C4D plugin to modify Redshift material parameters programmatically. However:
1.GetDescription() returns parameters but all show "Access Failed"
2.Direct access via ID (e.g., 2065829116 for roughness) logs success but no actual change
3.Node-based methods (GetNodeMaster()) don't expose shader parameters
Debug Attempts:
# All failed to get readable parameters
desc = mat.GetDescription(c4d.DESCFLAGS_DESC_0) # Returns unreadable params
bc = mat.GetDataInstance() # No valid data
mat[2065829116] = 1.0 # Logs success but no effect
Core Questions:
1.What is the correct API to enumerate all parameters in RS Shader Graph?
2.Official sample code for parameter modification?
In my daily workflow, I often use bridge plugins to import assets from other software into Cinema 4D. However, I occasionally encounter material errors that require batch adjustments—for instance, when multiple cloth materials incorrectly have a roughness value of 0 and need to be changed to 1. Manually modifying each material is inefficient, especially when dealing with large numbers.
To streamline this, I’d like to create a script that automatically iterates through selected materials, accesses their roughness parameter via the API, and updates the value uniformly. If anyone has insights into the relevant API methods or scripting approaches, I’d greatly appreciate any guidance or examples.