how\why :)
you right I should explain  a bit more..
First I wrote a python script that allows to export piece of geometry and
related data into a text file.
But how to use my script on animated geometry? execute my script during
playback?

- First shot was to just execute my script by defining  a start and end
frame and iterate using currentTime+=1. Not bad but you in case of large
animation you have to wait the end of the loop. I can't find a way to break
the loop until it's over
- Then I tried to use animation/ expression editor...as it "doesn't work"
with python I had to call my python script using "python()" .mel expression
which is crazy slow

So the purpose of this is to be able to run python script using play and
stop according to time frame. Kind of mimic the animation expression editor
with the possibility to use python object
Here I am today..
I am going to look at what you just sent me..
Appreciate you help :)
cheers



On Tue, Apr 7, 2015 at 12:14 PM, AK Eric <[email protected]> wrote:

> So I gave it a shot myself, and I realized the scriptJob only fires when
> the playback is *over*, not during playback.  That being said, scriptJobs
> have both a python cmd and pymel implementation, so there'd be no reason
> you'd need to call to the mel version.
>
> It's possible you could get away with something similar using an API
> MDGMessage callback:
>
> http://help.autodesk.com/view/MAYAUL/2015/ENU/?guid=__cpp_ref_class_m_d_g_message_html
> I have notes on how to use these here:
>
> http://mayamel.tiddlyspot.com/#%5B%5BAPI%3A%20How%20can%20I%20author%20callbacks%20for%20Maya%20events%3F%5D%5D
> But they *may* have the same failures as the scriptJob : only executing
> when the playback is over.
>
> Even easier than all this though : Just make an expression:
>
> print ("The Frame!" + frame + " \n");
>
>
> Totally works, and prints every frame during playback.  I create and
> manage expressions from Python all the time:  One button makes the
> expression node if it doesn't exist.  The other button deletes it if it
> does.  I'm still fuzzy on the how\why of all this, but I hope this helps ;)
>
> --
> 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/f816eba4-7f6c-487b-ae20-2bc863453341%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/f816eba4-7f6c-487b-ae20-2bc863453341%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/CAHn2C6SVuo3msxEyy_c%3DY6WsMDKSZiEeX1RC-QhKwg%2B6ZQ-bhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to