<?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: [Bug?] Maya 2019 C++ API MAnimUtil::findAnimatedPlugs not working on selecti in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8615995#M8282</link>
    <description>&lt;P&gt;Thanks for the reply,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yeah, this is a vary mysterious bug for me. After experimenting a bit, I have found some clues. It &lt;EM&gt;seems&lt;/EM&gt; that MAnimUtil methods &lt;STRONG&gt;do not work&lt;/STRONG&gt;&amp;nbsp;when called from within the MPxFileTranslator::writer method on a plugin compiled for 2019. However it &lt;STRONG&gt;does work correctly&lt;/STRONG&gt; when called from other methods, or a MPxCommand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To illustrate, I wrote a very simple plugin that I put on github here:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sacharobarts/AnimUtilTest" target="_blank"&gt;https://github.com/sacharobarts/AnimUtilTest&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I also included the compiled versions for 2018 and 2019.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In it, I call&amp;nbsp;&lt;SPAN&gt;MAnimUtil::isAnimated and&amp;nbsp;MAnimUtil::findAnimatedPlugs&amp;nbsp; and display the results in the script editor. I call them in both the ::creator method and the ::writer method. &lt;FONT size="1 2 3 4 5 6 7"&gt;(I'm aware you would never do this. It's just for debugging)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In Maya 2018, with an animated mesh selected, loading the plugin displays the following in the script editor ...&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;// # selected objects 1 // 
// isAnimated? 1 // 
// number animted plugs: 10 // &lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;It also displays the same info&lt;/STRONG&gt; when using File-&amp;gt;Export Selection with the AnimUtilTest format.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In Maya 2019, with an animated mesh selected, loading the plugin displays the same info as above. However, when exporting the selection it displays...&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;// # selected objects 1 // 
// isAnimated? 0 // 
// number animted plugs: 0 // &lt;/PRE&gt;
&lt;P&gt;I've already reinstalled Maya, the devkit, and made sure I'm using the correct version of VS.&lt;/P&gt;
&lt;P&gt;There could be something wrong with my setup, I'm just not sure what it would be...it's very mysterious...&lt;/P&gt;</description>
    <pubDate>Sat, 23 Feb 2019 06:37:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-02-23T06:37:21Z</dc:date>
    <item>
      <title>[Bug?] Maya 2019 C++ API MAnimUtil::findAnimatedPlugs not working on selection..</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8586560#M8280</link>
      <description>&lt;P&gt;I was having some problems getting animated plugs from a mesh and think I discovered a bug.&amp;nbsp;&amp;nbsp;MAnimUtil::findAnimatedPlugs seems to find 0 plugs when you have an object selected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steps to reproduce:&lt;/P&gt;
&lt;P&gt;1) Build the "animExportUtil" example in the dev-kit for Maya 2019.&lt;/P&gt;
&lt;P&gt;2) Create any object.&lt;/P&gt;
&lt;P&gt;3) Key-frame any attribute of the object (I just hit S to key-frame everything)&lt;/P&gt;
&lt;P&gt;4) With the object selected, choose File-&amp;gt;Export Selection..&lt;/P&gt;
&lt;P&gt;5) Open file, see there is no animation data in it!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Recompiling the same plug-in for Maya 2018 worked as expected, as did the plug-in I was writing...&lt;/P&gt;
&lt;P&gt;I also had problems with MFnDependencyNode::getConnections finding 0 connections...&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 06:43:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8586560#M8280</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-11T06:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: [Bug?] Maya 2019 C++ API MAnimUtil::findAnimatedPlugs not working on selecti</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8612940#M8281</link>
      <description>&lt;P&gt;Hi sacha.roberts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't seem to reproduce your issue. For me, the animExportUtil example worked for both 2018 and 2019. With your steps, I get the following:&lt;/P&gt;
&lt;PRE&gt;animVersion 1.1;
mayaVersion 2019;
anim visibility visibility pCube1 0 1 0;
animData {
  input time;
  output unitless;
  weighted 0;
  preInfinity constant;
  postInfinity constant;
  keys {
    1 1 spline step 1 0 0;
  }
}
anim translate.translateX translateX pCube1 0 1 1;
animData {
  input time;
  output linear;
  weighted 0;
  preInfinity constant;
  postInfinity constant;
  keys {
    1 0 auto auto 1 0 0;
  }
}
anim translate.translateY translateY pCube1 0 1 2;
animData {
  input time;
  output linear;
  weighted 0;
  preInfinity constant;
  postInfinity constant;
  keys {
    1 0 auto auto 1 0 0;
  }
}
anim translate.translateZ translateZ pCube1 0 1 3;
animData {
  input time;
  output linear;
  weighted 0;
  preInfinity constant;
  postInfinity constant;
  keys {
    1 0 auto auto 1 0 0;
  }
}
anim rotate.rotateX rotateX pCube1 0 1 4;
animData {
  input time;
  output angular;
  weighted 0;
  preInfinity constant;
  postInfinity constant;
  keys {
    1 0 auto auto 1 0 0;
  }
}
anim rotate.rotateY rotateY pCube1 0 1 5;
animData {
  input time;
  output angular;
  weighted 0;
  preInfinity constant;
  postInfinity constant;
  keys {
    1 0 auto auto 1 0 0;
  }
}
anim rotate.rotateZ rotateZ pCube1 0 1 6;
animData {
  input time;
  output angular;
  weighted 0;
  preInfinity constant;
  postInfinity constant;
  keys {
    1 0 auto auto 1 0 0;
  }
}
anim scale.scaleX scaleX pCube1 0 1 7;
animData {
  input time;
  output unitless;
  weighted 0;
  preInfinity constant;
  postInfinity constant;
  keys {
    1 1 auto auto 1 0 0;
  }
}
anim scale.scaleY scaleY pCube1 0 1 8;
animData {
  input time;
  output unitless;
  weighted 0;
  preInfinity constant;
  postInfinity constant;
  keys {
    1 1 auto auto 1 0 0;
  }
}
anim scale.scaleZ scaleZ pCube1 0 1 9;
animData {
  input time;
  output unitless;
  weighted 0;
  preInfinity constant;
  postInfinity constant;
  keys {
    1 1 auto auto 1 0 0;
  }
}
anim pCubeShape1 1 0 0;
&lt;/PRE&gt;
&lt;P&gt;Can you provide us with more details?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lanh&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 22:54:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8612940#M8281</guid>
      <dc:creator>lanh.hong</dc:creator>
      <dc:date>2019-02-21T22:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: [Bug?] Maya 2019 C++ API MAnimUtil::findAnimatedPlugs not working on selecti</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8615995#M8282</link>
      <description>&lt;P&gt;Thanks for the reply,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yeah, this is a vary mysterious bug for me. After experimenting a bit, I have found some clues. It &lt;EM&gt;seems&lt;/EM&gt; that MAnimUtil methods &lt;STRONG&gt;do not work&lt;/STRONG&gt;&amp;nbsp;when called from within the MPxFileTranslator::writer method on a plugin compiled for 2019. However it &lt;STRONG&gt;does work correctly&lt;/STRONG&gt; when called from other methods, or a MPxCommand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To illustrate, I wrote a very simple plugin that I put on github here:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sacharobarts/AnimUtilTest" target="_blank"&gt;https://github.com/sacharobarts/AnimUtilTest&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I also included the compiled versions for 2018 and 2019.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In it, I call&amp;nbsp;&lt;SPAN&gt;MAnimUtil::isAnimated and&amp;nbsp;MAnimUtil::findAnimatedPlugs&amp;nbsp; and display the results in the script editor. I call them in both the ::creator method and the ::writer method. &lt;FONT size="1 2 3 4 5 6 7"&gt;(I'm aware you would never do this. It's just for debugging)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In Maya 2018, with an animated mesh selected, loading the plugin displays the following in the script editor ...&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;// # selected objects 1 // 
// isAnimated? 1 // 
// number animted plugs: 10 // &lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;It also displays the same info&lt;/STRONG&gt; when using File-&amp;gt;Export Selection with the AnimUtilTest format.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In Maya 2019, with an animated mesh selected, loading the plugin displays the same info as above. However, when exporting the selection it displays...&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;// # selected objects 1 // 
// isAnimated? 0 // 
// number animted plugs: 0 // &lt;/PRE&gt;
&lt;P&gt;I've already reinstalled Maya, the devkit, and made sure I'm using the correct version of VS.&lt;/P&gt;
&lt;P&gt;There could be something wrong with my setup, I'm just not sure what it would be...it's very mysterious...&lt;/P&gt;</description>
      <pubDate>Sat, 23 Feb 2019 06:37:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8615995#M8282</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-23T06:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: [Bug?] Maya 2019 C++ API MAnimUtil::findAnimatedPlugs not working on selecti</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8631037#M8283</link>
      <description>&lt;P&gt;Hi sacha.roberts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even with your compiled versions of 2018 and 2019, it works perfectly fine for me. I also compiled your sample plugin, but still can't reproduce your issue. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you provide a scene that shows the problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It could be your setup, but I'm not sure either.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 19:31:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8631037#M8283</guid>
      <dc:creator>lanh.hong</dc:creator>
      <dc:date>2019-03-01T19:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: [Bug?] Maya 2019 C++ API MAnimUtil::findAnimatedPlugs not working on selecti</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8636456#M8284</link>
      <description>&lt;P&gt;Solved.&lt;/P&gt;
&lt;P&gt;I knew it had to be something messed up with the installation because even exported FBX files were missing all animation. Turns out it was something in prefs that was copied from my 2018 install. When I uninstalled 2019 the first time, it kept the prefs directory and never prompted me to ask if I wanted to use defaults or copy when I reinstalled.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Didn't think to clear it out until later. But removing the folder and using defaults is what fixed it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Such a strange, random bug to be caused by saved preferences... I don't really have anything that exotic in there. Just a few shelves and everything else is pretty standard.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, problem solved. Next time I run into something like that I'll remember to clear the prefs folder.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 06:50:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/bug-maya-2019-c-api-manimutil-findanimatedplugs-not-working-on/m-p/8636456#M8284</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-05T06:50:04Z</dc:date>
    </item>
  </channel>
</rss>

