Re: [Sripting] The best way to figure out the bounds of an object's animation...

Date : Tue, 8 Apr 2008 15:35:28 +0100
To : XSI(at)Softimage.COM
From : "Alan Jones" <skyphyr(at)gmail.com>
Subject : Re: [Sripting] The best way to figure out the bounds of an object's animation...
Hi Dan,

> I need to emulate the way XSI knows the total duration of an object's
> animation when creating an action.  I need the startframe and duration of
> the object's animation, and I have no idea what may or may not be animated.
>
> Anyone know of any shortcuts?  I couldn't see anything in the SDK, do I need
> to make a temporary clip and take the info I need from that?
>
> That is also trickier than you'd think given the criteria I listed above
> (i.e. not knowing what to mark - there could potentially be any kind of
> constraint or property on the object...)
>
> ....and the fact that without giving the StoreAction Command an in or out
> value, you get no clip anyway!  So essentially, you need the value you're
> looking for in order to find it!...
>
> SIStoreAction( null, null, 2, "temp_clip", false);
>
> I'm using Jscript.

To me that sounds like it's bordering on not being doable. When you take into
account inherited translation, expressions, constraints etc. You've
have a hell of
a lot of work to do traversing all the links recursively to find all
animation. Plus
add an Fc into an expression and there effectively is no end to when
it's animated.

I'd be looking for some what to place some kind of limit on the process in the
pipeline. A point where something is defined. i.e. the scene options
in rendering
for duration (or checking through the preferences on every pass if you want to
be a little more thorough). Then looping through getting the bounding
box at each
frame and expanding min/max vectors as necessary. Though remember even this
may not be a true representation as at subframe detail it may move further.

So it all really depends on what level of accuracy you require for the
use you make
of it in the end.

Another idea that just came to me is to perhaps look at plot and see if it
autocalculates anything of use you can nick.

Cheers,

Alan.
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.