Created
June 27, 2013 10:00
-
-
Save OmniZ3D/5875346 to your computer and use it in GitHub Desktop.
getSelectedOrder (MotionBuilder) snippet function via pyfbsdk FBGetSelectedModels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyfbsdk import * | |
def getSelectedOrder(): | |
# selectionOrder selection order | |
# Get the current selection | |
lModelList = FBModelList() | |
pParent = None | |
pSelected = True | |
pSortSelectedOrder = True | |
FBGetSelectedModels( lModelList, pParent, pSelected, pSortSelectedOrder ) | |
if not lModelList: return None | |
else: return lModelList | |
lSelected = getSelectedOrder() | |
for i in range(len(lSelected)): print "%d: %s" % ( i, lSelected[i].Name ) | |
## FBGetSelectedModels( | |
## tuple pList, | |
## FBModel pParent = None, | |
## bool pSelected = True, | |
## bool pSortBySelectOrder = False | |
## ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment