Scripting help needed on syntax and "storeaction " and "localproperties " 2005-06-22 - By Hugo Bergeron
Back Worked like a charm, merci beaucoup Bernard :-)
Hugo...
-- -- Original Message -- -- From: "Bernard Lebel" <3dbernard@(protected)> To: <XSI@(protected)> Sent: Wednesday, June 22, 2005 2:01 PM Subject: Re: Scripting help needed on syntax and "storeaction" and "localproperties"
> Salut Hugo, > > I don't know the answer to your first question, but for the second > one, localproperties are present only if there are actually > localproperties. This is a gotcha with XSI properties you have to take > care. You always have the properties, but not necarily the local > properties. So you have to test the present of the localproperties > property before anything else. I'd suggest a way in Python but you're > using VBScript so I'm affraid I can't point you as to how to. > > Btw, you can generally get the cpset of an object by checking the > properties. However if your cpset is applied in branch, there is a > risk that you find a cpset that is inherited from a "superior" object > (higher in the hierarchy). > > > Cheers > Bernard > > > > On 6/22/05, Hugo Bergeron <hbergeron@(protected)> wrote: >> 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 ... > > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|