<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic playblast NURBCurves &amp;amp; joints in mayapy mayastandalone in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/playblast-nurbcurves-amp-joints-in-mayapy-mayastandalone/m-p/11570729#M1638</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;Using the script editor I can see my NURBCurves and joints in my image, but they disappear when using my script.&lt;/P&gt;&lt;P&gt;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 &lt;STRONG&gt;Show &amp;gt; NURBCurves On/Off&lt;/STRONG&gt; has an impact on the image but strangely &lt;STRONG&gt;Show &amp;gt; Playblast Display &amp;gt; NURBCurves&lt;/STRONG&gt; does not.&lt;BR /&gt;Similarly&amp;nbsp; this impact my playblast command.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;editor = cmds.playblast(ae=True)
cmds.modelEditor(editor, nurbsCurves=False, edit=True)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;issue is I have no editor using mayapy and mayastandalone so I don't know how to set this preferences.&lt;BR /&gt;in mayapy :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ipdb&amp;gt; editor = cmds.playblast(ae=True)
*** RuntimeError: Model editor name cannot be found for current view&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I found the following settings that looks promising:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;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")&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;But no luck here too, it has no impact neither from mayapy or from the script editor..&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;Does anyone managed to do something similar and change the visibility options of object types for playblast in mayapy&amp;nbsp; ??&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 08:25:43 GMT</pubDate>
    <dc:creator>oliv.dxyz</dc:creator>
    <dc:date>2022-11-23T08:25:43Z</dc:date>
    <item>
      <title>playblast NURBCurves &amp; joints in mayapy mayastandalone</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/playblast-nurbcurves-amp-joints-in-mayapy-mayastandalone/m-p/11570729#M1638</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;Using the script editor I can see my NURBCurves and joints in my image, but they disappear when using my script.&lt;/P&gt;&lt;P&gt;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 &lt;STRONG&gt;Show &amp;gt; NURBCurves On/Off&lt;/STRONG&gt; has an impact on the image but strangely &lt;STRONG&gt;Show &amp;gt; Playblast Display &amp;gt; NURBCurves&lt;/STRONG&gt; does not.&lt;BR /&gt;Similarly&amp;nbsp; this impact my playblast command.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;editor = cmds.playblast(ae=True)
cmds.modelEditor(editor, nurbsCurves=False, edit=True)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;issue is I have no editor using mayapy and mayastandalone so I don't know how to set this preferences.&lt;BR /&gt;in mayapy :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ipdb&amp;gt; editor = cmds.playblast(ae=True)
*** RuntimeError: Model editor name cannot be found for current view&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I found the following settings that looks promising:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;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")&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;But no luck here too, it has no impact neither from mayapy or from the script editor..&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;Does anyone managed to do something similar and change the visibility options of object types for playblast in mayapy&amp;nbsp; ??&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 08:25:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/playblast-nurbcurves-amp-joints-in-mayapy-mayastandalone/m-p/11570729#M1638</guid>
      <dc:creator>oliv.dxyz</dc:creator>
      <dc:date>2022-11-23T08:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: playblast NURBCurves &amp; joints in mayapy mayastandalone</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/playblast-nurbcurves-amp-joints-in-mayapy-mayastandalone/m-p/11582684#M1639</link>
      <description>&lt;P&gt;If someone is looking for a solution, I found that using&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;cmds.ogsRender&lt;/LI-CODE&gt;&lt;P&gt;with the right values for&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;hardwareRenderingGlobals.objectTypeFilterValueArray&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;did the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also these lines&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;cmds.colorManagementPrefs(e=True, outputTransformEnabled=True,outputTarget="renderer")
cmds.colorManagementPrefs(e=True, outputUseViewTransform=True, outputTarget="renderer")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;allow to have a correct color management (image looking as the one I got from the ui).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only issue now is that the colors doesn't seems to come through for joints and nurbs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 15:47:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/playblast-nurbcurves-amp-joints-in-mayapy-mayastandalone/m-p/11582684#M1639</guid>
      <dc:creator>oliv.dxyz</dc:creator>
      <dc:date>2022-11-28T15:47:40Z</dc:date>
    </item>
  </channel>
</rss>

