1
2
3
4
5
6
7
8
9
10
11
12
13from pyfbsdk import *
14
16
17print("********************************************")
18print("***These are the constraints in the scene***")
19print("********************************************")
20for lCon in lCons:
21 print("Constraint Name ->", lCon.Name)
22 print(" Constraint Type ->", lCon.FbxGetObjectType() )
23 print(" Constraint Sub Type ->", lCon.FbxGetObjectSubType() )
24
25print
26for lCon in lCons:
27 if lCon.Is( FBConstraintRelation_TypeInfo() ):
28 print("*************************************************")
29 print("***These are the %d boxes in the %s Constraint***" % (len(lCon.Boxes), lCon.Name))
30 print("*************************************************")
31 for lBox in lCon.Boxes:
32 lOut = 0
33 lIn = 0
34 lAnimationNodesOUT = lBox.AnimationNodeOutGet().Nodes
35 for lAnimationNode in lAnimationNodesOUT:
36 for i in range(lAnimationNode.GetDstCount()):
37 if lAnimationNode.GetDst(0) != None:
38
39 if not lAnimationNode.GetDst(i).GetOwner().Name.startswith("Relation"):
40 lOut = 1
41
42 lAnimationNodesIN = lBox.AnimationNodeInGet().Nodes
43 for lAnimationNode in lAnimationNodesIN:
44 for i in range(lAnimationNode.GetSrcCount()):
45 if lAnimationNode.GetSrc(0) != None:
46 lIn = 1
47 if lOut == 0 and lIn == 1:
48 print("%s is a Receiver Box of type: %s, of sub type: %s" %( lBox.Name, lBox.FbxGetObjectType(), lBox.FbxGetObjectSubType() ) )
49 elif lOut == 1 and lIn == 0:
50 print("%s is a Sender Box of type: %s, of sub type: %s" %( lBox.Name, lBox.FbxGetObjectType(), lBox.FbxGetObjectSubType() ) )
51 else:
52 print("%s is a Function (operator) Box of type: %s, of sub type: %s" %( lBox.Name, lBox.FbxGetObjectType(), lBox.FbxGetObjectSubType() ) )
53 print()
54 print("**********************************************************************")
55 print("***These are the connections between the boxes in the %s Constraint***" % lCon.Name)
56 print("**********************************************************************")
57 for lBox in lCon.Boxes:
58 print("-------%s Box connected Animation Nodes-------" % lBox.Name)
59
60
61 lAnimationNodesOUT = lBox.AnimationNodeOutGet().Nodes
62
63 for lAnimationNode in lAnimationNodesOUT:
64 for i in range(lAnimationNode.GetDstCount()):
65 if lAnimationNode.GetDst(0) != None:
66
67 if not lAnimationNode.GetDst(i).GetOwner().Name.startswith("Relation"):
68 print("OUT: %s (%s) > %s (%s) " % (lBox.Name, lAnimationNode.UserName, lAnimationNode.GetDst(i).GetOwner().Name, lAnimationNode.GetDst(i).UserName))
69
70
71 lAnimationNodesIN = lBox.AnimationNodeInGet().Nodes
72 for lAnimationNode in lAnimationNodesIN:
73 for i in range(lAnimationNode.GetSrcCount()):
74 if lAnimationNode.GetSrc(0) != None:
75 print("IN: %s (%s) > %s (%s) " % (lBox.Name, lAnimationNode.UserName, lAnimationNode.GetSrc(0).GetOwner().Name, lAnimationNode.GetSrc(0).UserName))
76 print()
77
78
79
80
Provides access to the underlying system, and the MotionBuilder scene.
Definition: pyfbsdk_generated.h:18837