On 21/02/2017 at 04:51, xxxxxxxx wrote:
Cinema 4D Version: R17.055
Platform: Windows ;
Language(s) : PYTHON ;
I want to change some parameters of the Default Specular Layer in C4D R17,but it's not working,I don't know why?
Here is the code below:
from c4d import gui
def main() :
mats = doc.GetActiveMaterials()
if not mats:
for mat in mats:
mat[c4d.REFLECTION_LAYER_MAIN_DISTRIBUTION] = 3
mat[c4d.REFLECTION_LAYER_MAIN_ADDITIVE] = 0
Thank you for any help!
On 21/02/2017 at 09:43, xxxxxxxx wrote:
It's been a while since I worked with materials in Python, but if I remember correctly you need to add the layerID to your atrribute index
reflayer = mat.GetReflectionLayerIndex(idx)
mat[c4d.REFLECTION_LAYER_MAIN_DISTRIBUTION + reflayer.GetDataID()] = 3
On 21/02/2017 at 17:48, xxxxxxxx wrote:
You are talented! It's working now.