Community
##Navigate to texture Files##
Texts = FBSystem().Scene.Textures
for Text in Texts:
if Text.Name == "AnimateTexture":
print Text.Name
Texts = FBSystem().Scene.Textures
for Text in Texts:
if Text.Name == "AnimateTexture":
Text.Translation = FBVector2d(0,5) #set number for U and V
Text.Translation.Key()#then key
"""
You can step the transport control forward in time and set a key
"""
from pyfbsdk import *
player = FBPlayerControl()
Texts = FBSystem().Scene.Textures
for Text in Texts:
if Text.Name == "AnimateTexture":
for frame in :
player.Goto( FBTime(0,0,0,frame) )
Text.Translation = FBVector3d(frame,5,0) #set number for U and V ## I had to use a 3D vector, not sure why
Text.Translation.Key()#then key
"""
Or you can access the FBFCurve object of the texture and set keys at arbitrary time without
stepping the transport control forward. You can set keys on a specific curve, saving more space.
"""
from pyfbsdk import *
Texts = FBSystem().Scene.Textures
for Text in Texts:
if Text.Name == "AnimateTexture":
Text.Translation.SetAnimated(True)#make translation animatable so it has an animation node
tAnimNode = Text.Translation.GetAnimationNode() # this is the translation animation node
tuAnimNode = # this is the U coord, which is called x...
tuAnimNode.FCurve.EditBegin() # the docs say to use this to allow key addition to a curve
for frame in :
tuAnimNode.KeyAdd(FBTime(0,0,0,frame),frame) # the time and the value
tuAnimNode.FCurve.EditEnd()
Can't find what you're looking for? Ask the community or share your knowledge.