playblast NURBCurves & joints in mayapy mayastandalone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I'm trying to playblast a rig panel directly from a script (without maya ui) using mayapy. My issue is that my resulting images look different when playblasting from the script editor (within the maya ui) and from my mayapy script.
Using the script editor I can see my NURBCurves and joints in my image, but they disappear when using my script.
Searching in my interface I realize that the command on the panel to show the curves and joint is actually affecting my playblast. ie: the from the interface Show > NURBCurves On/Off has an impact on the image but strangely Show > Playblast Display > NURBCurves does not.
Similarly this impact my playblast command.
editor = cmds.playblast(ae=True)
cmds.modelEditor(editor, nurbsCurves=False, edit=True)
issue is I have no editor using mayapy and mayastandalone so I don't know how to set this preferences.
in mayapy :
ipdb> editor = cmds.playblast(ae=True)
*** RuntimeError: Model editor name cannot be found for current view
Also I found the following settings that looks promising:
cmds.getAttr("hardwareRenderingGlobals.objectTypeFilterNameArray")
['NURBS Curves', 'NURBS Surfaces', 'Polygons', 'Subdiv Surface', 'Particles', 'Particle Instance', 'Fluids', 'Strokes', 'Image Planes
', 'UI', 'Lights', 'Cameras', 'Locators', 'Joints', 'IK Handles', 'Deformers', 'Motion Trails', 'Components', 'Hair Systems', 'Follic
les', 'Misc. UI', 'Ornaments']
cmds.getAttr("hardwareRenderingGlobals.objectTypeFilterValueArray")
[0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
cmds.setAttr("hardwareRenderingGlobals.objectTypeFilterValueArray", [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0
, 0, 0], type="Int32Array")
But no luck here too, it has no impact neither from mayapy or from the script editor..
Does anyone managed to do something similar and change the visibility options of object types for playblast in mayapy ??