Reflection Layer Settings
-
Hi all,
is there any way to change values of Reflection Layer settings (blend mode and value) in Python?
It's strange that a parameter so simple was not implemented...
It's parent is c4d.REFLECTION_LAYER_DATA that seems to be not accessible.
Thanks lot. -
Reflection Layers aren't simple parameters. They are of type c4d.ReflectionLayer and have their own ID. Since the number of reflection layers can change dynamically, the parameter access also happens dynamically.
For example:
import c4d def main() : mat = doc.GetActiveMaterial() cntLayer = mat.GetReflectionLayerCount() # get the number of all reflection layers for i in xrange(0, cntLayer) : # loop through all layers layer = mat.GetReflectionLayerIndex(i) # process current layer # Sets the Strength for each layer to 50% mat[layer.GetDataID() + c4d.REFLECTION_LAYER_TRANS_BRIGHTNESS] = 0.5 # Here, the DataID is the unique, dynamic identifier for the layer. This can be chained with actual parameters. c4d.EventAdd() # update C4D if __name__=='__main__': main()
There's plenty of questions and answers to reflection layers on this forum. Just need to search for it.
-
Hi @kosmos3d please for the future use our Q&A Functionality.
Regarding your question, I think @mp5gosu provides the correct answers, if you want more information I let you read set / get reflectance layer options.
Cheers,
Maxime. -
Hi @kosmos3d,
without further questions or feedback, we will consider this thread as solved by Monday and flag it accordingly.
Cheers,
Ferdinand