Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Subject: Cameras
Subject: scaleDown command
Subject: black out solved
Subject: Aircraft Tutorial
Subject: Mathematical XYZ ?
Subject: Re: Its done This vs That
Subject: Re: Its done first week
recommendations for screen video captures?
Subject: 3DExplorer "Oddity "
Subject: Re: New Director
Subject: ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
Subject: RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Subject: Re: Texturing
Big Break Contest Videos
Subject: New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Subject: Plasma?
Looking for Inspiration
Subject: Weird EMail Q
Subject: Re: It 's done first week ?
Subject: Cherry not cranberry
Subject: Re: New game
Camera Animation Problem
Subject: Particle plugins?
 
Scripting help needed on syntax and "storeaction " and "localproperties "

Scripting help needed on syntax and "storeaction " and "localproperties "

2005-06-22       - By Hugo Bergeron

 Back
Reply:     1     2     3  

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>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 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>&nbsp;</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>&nbsp;</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&nbsp;facial sliders
animation&nbsp;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&amp;"/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&nbsp;clip as I want it,
with SRT's animation&nbsp;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)&nbsp;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&nbsp;:-P</FONT></P>
<P><FONT face=Arial size=2><STRONG><U>#2</U></STRONG></FONT>&nbsp;<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>&nbsp;&nbsp;&nbsp; if
oOo.type="customparamset" then<BR>&nbsp;&nbsp;&nbsp; logmessage
oOo<BR>&nbsp;&nbsp;&nbsp; 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&nbsp;so that the cpset is under an object
instead&nbsp;??? (which would be kinda frustrating :-S )</FONT></P>
<P><FONT face=Arial size=2></FONT>&nbsp;</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>