<?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: Input kDoubleArray not updating with MFnDoubleArrayData in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8497578#M8457</link>
    <description>&lt;P&gt;Hi Dan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the sample. There are few issues in the original code without considering the issue you mentioned. So I made some fixes based on my understanding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are some issues might affect the results here:&lt;/P&gt;
&lt;P&gt;1. Missing for affectAttributes for outputMap&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Setting arrayDataBuilder on inputMap isn't necessary&lt;/P&gt;
&lt;P&gt;3. You don't need to return anything&amp;nbsp;if it is kSuccess in Python.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After adding affectAttributes for outputMap, it is working fine now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yours,&lt;/P&gt;
&lt;P&gt;Li&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jan 2019 08:53:28 GMT</pubDate>
    <dc:creator>cheng_xi_li</dc:creator>
    <dc:date>2019-01-03T08:53:28Z</dc:date>
    <item>
      <title>Input kDoubleArray not updating with MFnDoubleArrayData</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8492516#M8454</link>
      <description>&lt;P&gt;I’m writing two nodes. The first node(nodeA) has a kDoubleArray output and the other(nodeB) has a kDoubleArray input. Each output/input use MFnDoubleArrayData to work with the plug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that when I connect nodeA to nodeB, nodeB gets and stores the array at the time of the connection but it won’t update after that. Even if nodeA is changing the array, nodeB plugs are marked dirty as expected, the deform method runs but the MDouble Array doesn’t change from its initial state.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NodeA is working as expected. Here is the code for setting the output plug.&lt;/P&gt;
&lt;P&gt;outMapData = dataBlock.outputValue(ProximityMap.outputMap)&lt;BR /&gt;outDblFn = OpenMaya.MFnDoubleArrayData()&lt;BR /&gt;outDblObj = outDblFn.create(outputMap)&lt;BR /&gt;outMapData.setMObject(outDblObj)&lt;BR /&gt;outMapData.setClean()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I tell nodeA to print an array version of ‘outDblObj’ before setting it clean it updates as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NodeB is not working as expected but does not give me any errors. Here is the code for getting the input plug.&lt;/P&gt;
&lt;P&gt;mapHandle = dataBlock.inputValue(MapToPP.inputMap)&lt;BR /&gt;inArrFn = OpenMaya.MFnDoubleArrayData(mapHandle.data())&lt;BR /&gt;currMap = inArrFn.array()&lt;BR /&gt;print(currMap)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I make the connection between the nodes, nodeB updates properly. After that, nodeB updates but ‘currMap’ remains the same as it was when it was first set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anybody else seen this happen? According to documentation this should all be written correctly and I’ve run out of things to try. Any suggestions would be appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 29 Dec 2018 21:31:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8492516#M8454</guid>
      <dc:creator>dan.norris.25</dc:creator>
      <dc:date>2018-12-29T21:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Input kDoubleArray not updating with MFnDoubleArrayData</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8497448#M8455</link>
      <description>&lt;P&gt;Hi Dan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't see some obvious issues in your description. Could you send us your sample code for testing?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yours,&lt;/P&gt;
&lt;P&gt;Li&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 06:55:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8497448#M8455</guid>
      <dc:creator>cheng_xi_li</dc:creator>
      <dc:date>2019-01-03T06:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Input kDoubleArray not updating with MFnDoubleArrayData</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8497493#M8456</link>
      <description>&lt;P&gt;Hello, thanks for the response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created a shortened version of each of the nodes here:&lt;/P&gt;
&lt;P&gt;GenericVtxMap(NodeA) is used for the output.&lt;/P&gt;
&lt;P&gt;&lt;A href="GenericVtxMap deformer is used for the output" target="_blank"&gt;https://github.com/danNorrisRigging/vtxMaps/blob/master/GenericVtxMap&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;MapOperation(NodeB) is used for the input&lt;/P&gt;
&lt;P&gt;&lt;A href="MapOperation is used for the input" target="_blank"&gt;https://github.com/danNorrisRigging/vtxMaps/blob/master/MapOperation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are both deformers. Do the following steps to test:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a polygon and apply both deformers&lt;/LI&gt;
&lt;LI&gt;Go into paint mode for 'GenericVtxMap1.inputMap' and flood all verts to 1.0&lt;/LI&gt;
&lt;LI&gt;Connect 'GenericVtxMap.outputMap' to 'MapToPP.inputMap'&lt;/LI&gt;
&lt;LI&gt;Check the script editor feedback, notice there are two arrays printing. Both arrays should be 1.0 on all.&lt;/LI&gt;
&lt;LI&gt;Flood the map to anything other than 1.0&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Check the script editor feedback, notice the two arrays are different&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Let me know if you need any other information.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 07:32:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8497493#M8456</guid>
      <dc:creator>dan.norris.25</dc:creator>
      <dc:date>2019-01-03T07:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Input kDoubleArray not updating with MFnDoubleArrayData</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8497578#M8457</link>
      <description>&lt;P&gt;Hi Dan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the sample. There are few issues in the original code without considering the issue you mentioned. So I made some fixes based on my understanding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are some issues might affect the results here:&lt;/P&gt;
&lt;P&gt;1. Missing for affectAttributes for outputMap&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Setting arrayDataBuilder on inputMap isn't necessary&lt;/P&gt;
&lt;P&gt;3. You don't need to return anything&amp;nbsp;if it is kSuccess in Python.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After adding affectAttributes for outputMap, it is working fine now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yours,&lt;/P&gt;
&lt;P&gt;Li&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 08:53:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8497578#M8457</guid>
      <dc:creator>cheng_xi_li</dc:creator>
      <dc:date>2019-01-03T08:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Input kDoubleArray not updating with MFnDoubleArrayData</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8499070#M8458</link>
      <description>&lt;P&gt;Hi Li,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the feedback. I tried it and it appears everything is working as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank,&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 19:36:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/input-kdoublearray-not-updating-with-mfndoublearraydata/m-p/8499070#M8458</guid>
      <dc:creator>dan.norris.25</dc:creator>
      <dc:date>2019-01-03T19:36:43Z</dc:date>
    </item>
  </channel>
</rss>

