RE: [scripting] caching point data over time

Date : Mon, 31 Jul 2006 19:45:26 +0100
To : <XSI(at)Softimage.COM>
From : "kim aldis" <kim(at)aldis.org.uk>
Subject : RE: [scripting] caching point data over time
I've more than once had problems with the current frame coming back with a
number not quite equal to an integral value, for example, 9.9999999 instead
of 10. When it does this, anything that integerises the number will round it
down to 9 and it all goes downhill. Use the Math.round() function to take it
to the nearest integral value rather than rounding it down.

> -----Original Message-----
> From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On
> Behalf Of Greg Smith
> Sent: 31 July 2006 19:08
> To: XSI_MailingList
> Subject: Re: [scripting] caching point data over time
> 
> Okay I think I have narrowed it down, it wasn't my cache so to speak
> but the scripted op that I was using to apply the cache data to the
> hair object. Currently I have it interrogating the current frame value
> using the command curFrm =
> int(Application.ActiveProject.Properties('Play
> Control').Current.Value)
> Seems that the PlayControl doesn't evaluate properly in the scripted
> op!
> er
> 
> however when I put a Log message in the scripted op to show the value
> of the current frame. On the frames I am having issues with, its
> returning the previous frame so for instance I scrub to frame 99 it
> logs 99, I scrub to frame 100 it returns 99, I scrub to 101 it returns
> 101. So its the Play Control giving me all this stress, and to think it
> was my caching script all this time. So with that being said. Is there
> a way to accurately return the value of the current frame
> 
> So I created a new scene, added a null put a simple translation
> animation. added as scripted op that reads in the translation, and have
> the scripted op use the command above and then logmessage the result.
> Low and behold the frames that gave me issues in my cache scenes reared
> their ugly head on this scene. So I guess I am gonna have to find a
> better way to get the current frame, whether it be to drop scripted ops
> and use a self installed custom Op, or find a more accurate command to
> give me the current frame value. I wonder if it has to do with the
> framerate in the playback options?
> 
> so far the culprit frames that don't work are:
> 15,25,30,39,50,59,60,61,69,78,87,100,109,118,120,121,122,129,138,147...
> .
> 
> On Mon, 2006-07-31 at 09:43 -0700, Greg Smith wrote:
> > I have an interesting little problem here, I am trying to create a
> > point caching tool that captures point position data from a cached
> > syflex simulated object and in turn apply it to a hair object. So far
> > I have it 'mostly' working. This it is the emphasis on 'mostly' that
> > my question arises. It seems at certain frames, the positional data
> is
> > not properly being captured. In fact, upon inspection. It looks as if
> > the data is that of the previous frame. To me my guess is that the
> > script I run captures the point data before the syflex cache has a
> chance to refresh.
> > I've tried to prevent that from happening by using a Refresh() or
> > SceneRefresh() command, but that doesn't seem to help me one bit.
> > Bugger! What even concerns me even more is that every time I run my
> > caching script. Its the same exact frames that the caching fails on.
> > I'm trying everything that I can possibly think of to ensure I am
> > getting the right data. Instead of using ActivePrimitive.Geometry, I
> > am using ActivePrimitive.GetGeometry(frame#) (using python) to get
> the
> > data from the right time frame. still no luck. So I am a bit stuck as
> > what would cause these hiccups. I imagine if I could access the data
> > from the syflex cache files, this wouldn't be much of a problem.
> Grrr.
> >
> > oh well, I will continue to test the stress factors of my hair roots!
> >
> > Greg
> >
> >
> > ---
> > Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
> body:
> > unsubscribe xsi
> 
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
> body:
> unsubscribe xsi
> 



---
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.