We are getting this error. Seems like some of the default shaders in Maya like "initialParticleSE" shaders doesn't play well with mtoa. Not sure why adding aovs on some of our scenes are causing this problem. Fyi: initialParticleSE cannot be deleted or manipulated because it is Maya default node.
--Felipe
# Error: setAttr: The attribute 'initialParticleSE.aiCustomAOVs[0].aovName' is locked or connected and cannot be modified. # Traceback (most recent call last): # File "/net/software/autodesk/modules/maya/2020/arnold/maya2020_linux_4.2.3/scripts/mtoa/ui/aoveditor.py", line 163, in addAOVs # aov = self.renderOptions.addAOV(aovName, aovShader=aovShaderName) # File "/net/software/autodesk/modules/maya/2020/arnold/maya2020_linux_4.2.3/scripts/mtoa/aovs.py", line 419, in addAOV # addAliases([aov]) # File "/net/software/autodesk/modules/maya/2020/arnold/maya2020_linux_4.2.3/scripts/mtoa/aovs.py", line 173, in addAliases # cmds.setAttr(plug, aov.name, type="string") # RuntimeError: setAttr: The attribute 'initialParticleSE.aiCustomAOVs[0].aovName' is locked or connected and cannot be modified. #
@Stephen Blair attached is a zip file with 2 empty maya files, open reproScene2.ma and make sure that the externalFile2.ma is properly referenced. Then attempt to add multiple aovs in the Render settings panel. You should get the error above. reproScenes.zip
No worries, we got around it by editing aovs.py But it would be nice to not have to add this change set every time we upgrade versions.
Hello, we are still running into this issues in Maya 2022.2. Any updates?
Did you try unlocking it with MEL?
- lockNode -lock off -lu off initialParticleSE
What happens on Linux? You can't add AOVs at all?
try this python script.
import maya.cmds as cmds
cmds.lockNode('initialShadingGroup', lock=False, lu=False)
cmds.lockNode('initialParticleSE', lock=False, lu=False)
Try this python script
import maya.cmds as cmds
cmds.lockNode('initialShadingGroup', lock=False, lu=False)
cmds.lockNode('initialParticleSE', lock=False, lu=False)
This works, thank you very much
I did use the script a bit changed as the initial shading group was locked and could not apply a new shader at the object at all.
Mel script: lockNode -lock off -lu off initialParticleSE initialShadingGroup.nodeState
# Error: RuntimeError: file C:\solidangle\mtoadeploy\2018\scripts\mtoa\aovs.py line 164: setAttr: The attribute 'initialParticleSE.aiCustomAOVs[0].aovName' is locked or connected and cannot be modified.
@subratakaal99 Try updating your plugin here.