great! really closed to what I am looking for. I am going to combine it with a play stop buttons, although I am not sure to be able to override esc key, but I get the wrapper logic now ... thx !
On Wed, Apr 8, 2015 at 1:03 AM, AK Eric <[email protected]> wrote: > If you're trying to export stuff per frame over a long sequence, then you > want the calling code to control the frame step, not Maya's playback > mechanism. I've authored tools that export a .obj per frame over a > framerange for the selected mesh. In that case, you pass your min\max > frame-range to pythons range function, and loop over those: Each loop you > set Maya's frame to the given iteration, then do the export work you're > after. If you're concerned about canceling the job in the middle of some > super-long sequence, wrapper the whole thing in a progressWindow. I have > an example of how to author a progressWindow context manager here: > > http://mayamel.tiddlyspot.com/#%5B%5BHow%20can%20I%20author%20a%20progressWindow%20context%20manager%3F%5D%5D > I use this all the time, and sounds like even the example code could get > you what you're after, since it iterates over a frame range. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Python Programming for Autodesk Maya" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/python_inside_maya/kfpi8VrLpLw/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/4be104b4-a85e-4d7c-b28a-0cfd4911d4a9%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/4be104b4-a85e-4d7c-b28a-0cfd4911d4a9%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CAHn2C6ReWVw4R-qfd9cwrGAkKD%3DYQY_542iTbX412auxFqfs%2Bg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
