On 21/02/2017 at 04:51, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17.055
Platform: Windows ;
Language(s) : PYTHON ;
---------
Hi,guys.
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:
import c4d
from c4d import gui
def main() :
doc.StartUndo()
mats = doc.GetActiveMaterials()
if not mats:
return
for mat in mats:
mat[c4d.REFLECTION_LAYER_MAIN_DISTRIBUTION] = 3
mat[c4d.REFLECTION_LAYER_MAIN_ADDITIVE] = 0
doc.AddUndo(c4d.UNDOTYPE_CHANGE,mat)
doc.EndUndo()
c4d.EventAdd()
if __name__=='__main__':
main()
Thank you for any help!