Hey Bob, Which versions and platforms have you tried this on?
On 27 October 2015 at 17:10, Bob Loblaw <[email protected]> wrote: > Hello, > > I'm working on a surface shader plugin and have run into problems when the > attributes of the plugin are keyframed and the plugin is queried in a loop > that calls cmds.currentTime to change frames, as might happen during a bake > or a batch render. Has anyone seen something like this before? > > The attached plugin and scenes are as boiled down as I could go. If you > run the following commands with the v001 scene that has no keyframes, the > loop runs as expected. If you run the commands in scene v002, where the > 'testMaterial' intensity attribute is keyframed, Maya hangs pretty much > immediately. Note that the keyframed attribute doesn't have to be queried > to cause the hang, it just has to be keyframed. > > Thanks in advance for your help, > Bob > > > nodesPath = "/tmp/maya" > cmds.loadPlugin( "%s/testMaterial.py" % nodesPath ) > > node = "testMaterial1" > value = 0 > for i in range(0,10): > print( i ) > print( "changing frames" ) > cmds.currentTime(float(i)) > > #value = cmds.getAttr( "%s.%s" % (node, "intensity") ) > print( i, value ) > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/cb4b9aeb-c0fc-4ca4-b2b1-5e92bedca3a9%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/cb4b9aeb-c0fc-4ca4-b2b1-5e92bedca3a9%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- *Marcus Ottosson* [email protected] -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCdfiNFPhJBR1O_2jU%3DZReNFATGtf6kgw4QEixDy%3DSE7w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
