Code:
from pyfbsdk import *# initialize the needed variables
lScene = FBSystem().Scene
for lcon in lScene.Components:
if lcon:
# searching for constraint with Toe in name
if lcon.Name.find("Toe") != -1:
if lcon.ClassName() == "FBConstraint":
# got it, so print name to check
print (lcon.Name + " " +lcon.ClassName()+"\n\n")
#ok now find its active properties to set
fCon = lcon.PropertyList.Find("Active")
#print it so we know what it was for debug
print fCon.Data
#set it to 0 to deactiave it
fCon.Data = 0
#print it agian to see if it changed for debuging
print fCon.Data
# deactivate the constraint.
This code can be cleaned up but the process to find the constraint, find a property and then set that property was just about impossible to find help or examples on. Hope it helps some one else out there.
Thanks Al for setting this forum up.
Brad
_________________
Brad Clark
Motion Editor/Animator/Character TD... The Animation Farm ...Austin TX
