Python Reference Guide
 
Loading...
Searching...
No Matches
BasicOperations\FBConstraintManager.py
1# Copyright 2009 Autodesk, Inc. All rights reserved.
2# Use of this software is subject to the terms of the Autodesk license agreement
3# provided at the time of installation or download, or which otherwise accompanies
4# this software in either electronic or hard copy form.
5#
6# Topic: FBConstraintManager, FBPlug
7#
8
9from pyfbsdk import FBConstraintManager, FBSystem
10
11# We create new constraints with thr constaint manager.
13lScene = FBSystem().Scene
14# We want to create one constraint of each types that exists.
15for lIdx in range( lMgr.TypeGetCount() ):
16
17 # We create the constraint, which will be automatically added to the scene.
18 lCnst = lMgr.TypeCreateConstraint( lIdx )
19
20 # Set its name
21 lCnst.Name = "%s Created by script" % lMgr.TypeGetName( lIdx )
22
23 # User feedback, if the python console is up.
24 print("Adding new constraint: '%s'" % lCnst.Name)
25
26 # Cleanup.
27 del( lCnst )
28
29# Cleanup.
30del( lMgr, lIdx, FBConstraintManager )
Constraint manager.
Definition: pyfbsdk_generated.h:5051
Provides access to the underlying system, and the MotionBuilder scene.
Definition: pyfbsdk_generated.h:18771