Area :: Header
Join us at EUE2014, June 5-6, Utrecht-NL
Register Now
Discussion Groups

Python

Reply
New Member
thieljoe
Posts: 2
Registered: ‎08-01-2009

Animation Clip.Offset and MarkOut

35 Views, 2 Replies
02-23-2012 01:27 PM
greetings,

Currently attempting Creating Animation Clips in the Story, that have Offset Start Times (FirstLoop) , whenever this value is set then the clip loops every frame appearing black in the Animation Track. If i manually set the MarkOut value to a large number then it is fixed (not looping), but setting this value through python does not affect the clip. additionally many of the other values do not seem to be affected when set in the script, (FirstLoop , LastLoop, Loop, AutoLoop etc.). the MarkOut keeps getting set to 1 frame when Offset.

is there an alternate way to set this MarkOut value, or is the way im currently setting the Offset incorrect? i've tried changing the order of setting the values but no luck.

here is example code , with attemptings to set the Offset / MarkOut:


from pyfbsdk import *
try:
lTrack = FBStoryTrack(FBStoryTrackType.kFBStoryTrackAnimation)
lTrack.Label = "Animation Track"
lAnim = "C:\example.fbx"
lClip = FBStoryClip (lAnim, lTrack, FBTime(0,0,1,0))

lClip.Loop = 0
lClip.AutoLoop = 0
lClip.OffsetEnable = 1

lClip.Start = FBTime(0,0,1,5)
lClip.Offset = FBTime(0,0,3,0)
lClip.Stop = FBTime(0,0,6,1)

lClip.FirstLoop = FBTime(0,0,0,15)
lClip.LastLoop = FBTime(0,0,20,1)

lClip.MarkOut = FBTime(1,20,20,1)

except IOError:
FBMessageBox( "Cannot Continue", "Unable to read the audio track definition file you selected or you have not selected one.", "OK", None, None )
exit

Please use plain text.
Active Contributor
Ollie_D_1
Posts: 26
Registered: ‎08-23-2006

Re: Animation Clip.Offset and MarkOut

02-25-2012 04:01 AM in reply to: thieljoe
What version are you using? This is a bug in 2011 that is fixed in 2012. Unfortunately there was no work around I could find, other than upgrading. It just had to adjusted manually once the clip had been loaded. Even then it would often cause this error.
Please use plain text.
New Member
thieljoe
Posts: 2
Registered: ‎08-01-2009

Re: Animation Clip.Offset and MarkOut

02-26-2012 06:57 PM in reply to: thieljoe
ah thank you for this confirmation , we are indeed using 2011 ,
ill continue to fix manually after the running script.
Please use plain text.