Scripting help needed on syntax and "storeaction " and "localproperties " 2005-06-22 - By Hugo Bergeron
Back Hello to all, I dont know if this would be the right list to sent this mail to, please notify me if I should post elsewhere :-)
This is a two part question, concerning an animation export script:
#1 I'm writing a quick animation export script. It takes an object collection, and stores the Scaling/Rotation/Translation fcurves and the facial sliders animation to a clip, then saves the clip on disk . To do this, I use the following line, "oObjects" being obvioulsy the objects collection. set oAction=StoreAction (, oObjects&"/kine.local.scl,kine.local.ori,kine.local .pos", 2, , False, , , False, False, False, 0)
So this outputs an action clip as I want it, with SRT's animation fcurves only, nothing else (no linked parameters, etc...) Problem is I want to add to that the animated parameters from a "custom parameter set", so that when the clip is loaded on another character, all the animation (body and facial) is in one clip. What is the syntax to add the parameters (which I extract using "localproperties") in front of "oObjects"?
-Using comas wont cut it because i'm using the forewardslash instead of object .kine.local.rotx,object.kine.local.roty, etc... it is faster and cleaner. But I need to add : oParameter.Blink for instance in front of it... (which is already extracted)
-Adding the cpset to the object collection does not work either, since then I would need to store all fcurves and linked parameters would also be stored, which I dont want.
I'm pretty sure i'm not making any sense, I have troubble clearing this in my head :-P
#2 How come I can't extract the local properties of a model or null? It seems to work only with objects... For instance, if I have a selected object which have a custom pset, and run the following line:
for each oOo in selection(0).localproperties if oOo.type="customparamset" then logmessage oOo end if next
I get the custom pset. But if the custom pset is located on a model, nothing gets returned... Do I need to modify all the production characters and scripts so that the cpset is under an object instead ??? (which would be kinda frustrating :-S )
Thanks for the help !!!
Hugo ...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2900.2668" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Hello to all,</FONT></DIV> <DIV><FONT face=Arial size=2> I dont know if this would be the right list to sent this mail to, please notify me if I should post elsewhere :-)</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>This is a two part question, concerning an animation export script:</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2><STRONG><U>#1</U></STRONG></FONT></DIV> <DIV><FONT face=Arial size=2>I'm writing a quick animation export script.</FONT></DIV> <DIV><FONT face=Arial size=2>It takes an object collection, and stores the Scaling/Rotation/Translation fcurves and the facial sliders animation to a clip, then saves the clip on disk.</FONT></DIV> <DIV><FONT face=Arial size=2>To do this, I use the following line, <STRONG>"oObjects"</STRONG> being obvioulsy the objects collection.</FONT></DIV> <DIV> <P><STRONG>set oAction=StoreAction (, oObjects&"/kine.local.scl,kine.local.ori,kine.local.pos", 2, , False, , , False, False, False, 0)</STRONG></P> <P><FONT face=Arial size=2>So this outputs an action clip as I want it, with SRT's animation fcurves only, nothing else (no linked parameters, etc...)<BR>Problem is I want to add to that the animated parameters from a "custom parameter set", so that when the clip is loaded on another character, all the animation (body and facial) is in one clip. What is the syntax to add the parameters (which I extract using "localproperties") in front of "oObjects"? </FONT></P> <P><FONT face=Arial size=2>-Using comas wont cut it because i'm using the forewardslash instead of object.kine.local.rotx,object.kine.local.roty, etc... it is faster and cleaner. But I need to add : oParameter.Blink for instance in front of it... (which is already extracted)</FONT></P> <P><FONT face=Arial size=2>-Adding the cpset to the object collection does not work either, since then I would need to store all fcurves and linked parameters would also be stored, which I dont want.</FONT></P> <P><FONT face=Arial size=2>I'm pretty sure i'm not making any sense, I have troubble clearing this in my head :-P</FONT></P> <P><FONT face=Arial size=2><STRONG><U>#2</U></STRONG></FONT> <FONT face=Arial size=2><BR>How come I can't extract the local properties of a model or null? It seems to work only with objects...<BR>For instance, if I have a selected object which have a custom pset, and run the following line:</FONT></P> <P>for each oOo in selection(0).localproperties<BR> if oOo.type="customparamset" then<BR> logmessage oOo<BR> end if<BR>next</P> <P><FONT face=Arial size=2>I get the custom pset. But if the custom pset is located on a model, nothing gets returned... Do I need to modify all the production characters and scripts so that the cpset is under an object instead ??? (which would be kinda frustrating :-S )</FONT></P> <P><FONT face=Arial size=2></FONT> </P> <P><FONT face=Arial size=2>Thanks for the help !!!</FONT></P> <P><FONT face=Arial size=2>Hugo ...</FONT></P></DIV></BODY></HTML>
|
|