|
While an investigation is going on about this bug, I offer you a possible workaround that uses the comments field of the takes to store the values you want. Here is the script:
from pyfbsdk import *
def SetCommentsFromTakeValues():
lTakes = FBSystem().Scene.Takes
for Take in lTakes:
print Take.Name
LocalStartFrame = Take.LocalTimeSpan.GetStart().GetTimeString()
print "LocalStartFrame: " + LocalStartFrame
LocalEndFrame = Take.LocalTimeSpan.GetStop().GetTimeString()
print "LocalEndFrame: " + LocalEndFrame
ReferenceStartFrame = Take.ReferenceTimeSpan.GetStart().GetTimeString()
print "ReferenceStartFrame: " + ReferenceStartFrame
ReferenceEndFrame = Take.ReferenceTimeSpan.GetStop().GetTimeString()
print "ReferenceEndFrame: " + ReferenceEndFrame
NoteString = ""
NoteString = NoteString.join("StoredTakeValues," + LocalStartFrame + "," + LocalEndFrame + "," + ReferenceStartFrame + "," + ReferenceEndFrame)
print NoteString
Take.Comments = NoteString
def RestoreValuesToTakes():
lTakes = FBSystem().Scene.Takes
for Take in lTakes:
NoteString = Take.Comments
NoteStringSplit = NoteString.split(",")
Take.LocalTimeSpan = FBTimeSpan(FBTime(0,0,0,int(NoteStringSplit[1])),FBTime(0,0,0,int(NoteStringSplit[2])))
Take.ReferenceTimeSpan = FBTimeSpan(FBTime(0,0,0,int(NoteStringSplit[3])),FBTime(0,0,0,int(NoteStringSplit[4])))
print Take.Name + " restored from Comments Values."
It will allow you to setup the real values that you want to use in the Takes interface, then store them in the Comments field by running the first function.
After it is set, you can then restore those values any time with the second function. I am assuming at file save time…
Anyway, post any further questions or issues about this.
Thanks!
P.S. Yes, this is un-commented, probably redundant in many ways but I wanted to post it as soon as I had it working…
|