How would i record the values of attribute over time?
I was told that with Maya Standalone, you don’t have access to Mayas UI elements because that aren’t loaded/ don’t exist. So if I wanted to record the position of a constrained object from a certain time range ie( 1-20) how would I achieve this? Since I can’t use the cmds.currentTime() command to update the time in the scene file? And bakeResult only bakes out the first frame of the object…
getAttr has a flag called Time, see if that does the trick “Evaluate the attribute at the given time instead of the current time.”
Also, I have managed to use listconnections to get hold of the animation node of a ‘set driven key’ once and was able to grab values out of the curves of that anim-node.
Gonna check if I can find some of that code and post it.
Arite thank you, what is the best way of running maya standalone? i’ve been making a bat file and executing it that way, but when I try that same method on other computers it crashes
If you want to be able to call a standalone instance from a tool you can open mayapy.exe using subprocess or os.sytem and then pass the .py file you want to run as a command arg, as well as args for the .py file like so.
Matt - That maya.standalone import thing is new to me. Why is it necessary? I thought you could just plop some python in a file and mayapy would execute it as expected…?