mtoa error when adding AOVs due to initialParticleSE shader

mtoa error when adding AOVs due to initialParticleSE shader

felipe.ruizQ99GU
Participant Participant
5,776 Views
14 Replies
Message 1 of 15

mtoa error when adding AOVs due to initialParticleSE shader

felipe.ruizQ99GU
Participant
Participant

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. # 
0 Likes
5,777 Views
14 Replies
Replies (14)
Message 2 of 15

Stephen.Blair
Community Manager
Community Manager
Got a repro scene you can share? Or are there some steps I have to do before adding an AOV?


// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 3 of 15

felipe.ruizQ99GU
Participant
Participant

@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

0 Likes
Message 4 of 15

felipe.ruizQ99GU
Participant
Participant
Thanks for looking into this. Please see Answer's section for attachment.
0 Likes
Message 5 of 15

Stephen.Blair
Community Manager
Community Manager
@

Thanks. But I'm off today and tomorrow is a global corporate holiday...



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 6 of 15

felipe.ruizQ99GU
Participant
Participant

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.

0 Likes
Message 7 of 15

felipe.ruizQ99GU
Participant
Participant

Hello, we are still running into this issues in Maya 2022.2. Any updates?

0 Likes
Message 8 of 15

Stephen.Blair
Community Manager
Community Manager

Did you try unlocking it with MEL?

  1. lockNode -lock off -lu off initialParticleSE



// Stephen Blair
// Arnold Renderer Support
Message 9 of 15

Stephen.Blair
Community Manager
Community Manager
I'm still able to add AOVs, and they render. But that is on Windows.

What happens on Linux? You can't add AOVs at all?



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 10 of 15

felipe.ruizQ99GU
Participant
Participant
Yeah! that works. Thanks!
0 Likes
Message 11 of 15

Karthik_Kumar1
Not applicable

try this python script.

import maya.cmds as cmds

cmds.lockNode('initialShadingGroup', lock=False, lu=False)

cmds.lockNode('initialParticleSE', lock=False, lu=False)

0 Likes
Message 12 of 15

Karthik_Kumar1
Not applicable

Try this python script

import maya.cmds as cmds

cmds.lockNode('initialShadingGroup', lock=False, lu=False)

cmds.lockNode('initialParticleSE', lock=False, lu=False)

0 Likes
Message 13 of 15

andrej.djukic
Community Visitor
Community Visitor

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

0 Likes
Message 14 of 15

subratakaal99
Community Visitor
Community Visitor

# 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.

 

0 Likes
Message 15 of 15

lee_griggs
Autodesk
Autodesk

@subratakaal99  Try updating your plugin here.

Lee Griggs
Arnold rendering specialist
AUTODESK
0 Likes