<?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 Re: Anyone else suffering this bug? in Maya Modeling Forum</title>
    <link>https://forums.autodesk.com/t5/maya-modeling-forum/anyone-else-suffering-this-bug/m-p/5493449#M25592</link>
    <description>&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;hey Xanderland, thats an interesting find.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;I took a look at the graph when this is occurring and can see a few interesting things going on here.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;The Transform node that is under the resulting polySeparate group is the associated transform for the intermediate object (the original). This intermediate has DAG set &lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;member connections on&amp;nbsp;the shading Group Node (Shading Engine)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;If I graph in the two resulting meshes from the polySeparate operation, along with the intermediate transform into the Node Editor, we can see that they also have &lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;outbound connections going to the DAG set membership attributes on the shadingEngine node.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;The intermediate outbound is going into the DAG Set member index [0], where the outbound of the resulting shapes are going to DAG Set member index [1] and [2]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;If we continue with the reproduction steps (unparent the two resulting shapes and delete the top group which includes the intermediate) we do get the green shading in &lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;the viewport (&amp;lt;- representative of a lost shader). Whats interesting though is the intermediate shape that was going to the DAG Set member index [0] is resolved and the &lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;outbound DAG set membership on the resulting meshes remain in index [1] and index [2] respectively. At first glance, nothing should change. But it does, the shading &lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;gets lost. If we approach it with Deleting History as opposed to unparenting from the resulting group an interesting thing occurs. The intermediate going to index[0] is &lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resolved but the resulting meshes are in new DAG set membership indices (now [3] and [4]). It would appear that this reconnection to new indices is causing a perceived &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;preservation of the shading.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;One thing thats interesting to note though is that if we manually reconnect the connections of the resulting meshes outbound to the same DAG Set member indices when &lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;performing the problematic repro steps, the shading in the viewport comes back. Its as if its triggering a refresh on the connection.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;It is not clear as to why this is happening. It would be my understanding that if it has connections to the SG node then it should always know how to draw its surface &lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;material for as long as the connection exists. If we move the objects out of the group and delete the group it appears that nothing is happening to those connections. &lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;So the shading should persist. Therefore I would say this is indeed a defect.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;The current workaround however is to `DeleteHistory`&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;or perhaps one could also unparent the Intermediate before deleting the group (will cause change to long name and/or namespace of the intermediate).&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;I also found that the script put together below works too but its a fairly bad script &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;////////////////////////////////////////////////////////////////////////////////////////////////////&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;// when losing the shading, I could return it with this script&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;string $storeSelectedItems[] = `ls -sl -dag -shapes`;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;for ( $each in $storeSelectedItems){&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt; select -r $each;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt; string $getSGOnly[] = `listConnections -type "shadingEngine"`;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt; string $getSGConnection[] = `listConnections -p on -type "shadingEngine"`;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt; string $getDSMattr[] = `listAttr $getSGConnection[0]`;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt; connectAttr -f ($each + ".instObjGroups[0]") ($getSGOnly[0]+ "." + $getDSMattr[0]);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;// very basic script.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;// wont work with per-component shading&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;// used only to test on my side, I dont recommend anyone to use this as a viable workaround.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;//&lt;/SPAN&gt;&lt;SPAN&gt;//////////////////////////////////////////////////////////////////////////////////////////////////&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;NOTES&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;---------------------------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Delete History Workflow:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Pre Delete History&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;intermediateObj.instObjGroup[0] -&amp;gt; SG.Dag Set Member[0]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resultMesh01.instObjGroup[0] -&amp;gt; SG.Dag Set Member[1]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resultMesh02.instObjGroup[0] -&amp;gt; SG.Dag Set Member[2]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Post Delete History:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;intermediateObj is resolved&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resultMesh01.instObjGroup[0] -&amp;gt; SG.Dag Set Member[3] // interesting, it reconnects them to different index ports. &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resultMesh02.instObjGroup[0] -&amp;gt; SG.Dag Set Member[4] // Perhaps this triggers a change or refresh internally, causing the shader to be preserved&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;---------------------------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Manual Workflow where shading is lost:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Pre Unparent and Delete Group&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;intermediateObj.instObjGroup[0] -&amp;gt; SG.Dag Set Member[0]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resultMesh01.instObjGroup[0] -&amp;gt; SG.Dag Set Member[1]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resultMesh02.instObjGroup[0] -&amp;gt; SG.Dag Set Member[2]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Post Unparent and Delete Group:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;intermediateObj is resolved&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resultMesh01.instObjGroup[0] -&amp;gt; SG.Dag Set Member[1] // Same index as before Unparent&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resultMesh02.instObjGroup[0] -&amp;gt; SG.Dag Set Member[2]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;If we reconnect the connections manually into the same Indexes:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resultMesh01.instObjGroup[0] -&amp;gt; SG.Dag Set Member[1]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;resultMesh02.instObjGroup[0] -&amp;gt; SG.Dag Set Member[2]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;And then press rewind, the shading comes back.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Something here is triggering a refresh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;CLOSING: I will check our backlog to see whats there. Fairly certain this specific issue is not catalogued but I will ask around. Regardless, if I find a defect or write one up, I will return to you guys a defect number.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;more to follow later.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Feb 2015 17:15:02 GMT</pubDate>
    <dc:creator>syracoj</dc:creator>
    <dc:date>2015-02-03T17:15:02Z</dc:date>
  </channel>
</rss>

