Unlock defaultArnoldRenderOptions attributes


#1

Greetings,

I have to create a skyShader and connect it with the defaultArnoldRenderOptions.background node. I am unable to do it successfully and get the following error.

Command
mc.setAttr( “defaultArnoldRenderOptions.background”, lock=False)
mc.setAttr(“defaultArnoldRenderOptions.background”, “aiSkyTransform”,type=“string”)

Error
# Error: setAttr: The attribute ‘defaultArnoldRenderOptions.background’ is locked or connected and cannot be modified.

Traceback (most recent call last):

File “<maya console>”, line 1, in <module>

RuntimeError: setAttr: The attribute ‘defaultArnoldRenderOptions.background’ is locked or connected and cannot be modified.

Please suggest me a way to get this working.

Thanks :slight_smile:


#2

You would need to use connectAttr, and hook up the message attribute of the aiSky node (not a transform):

cmds.connectAttr('aiSky.message', 'defaultArnoldRenderOptions.background')

#3

Thanks spire2 :bowdown: