Python Reference Guide
 
Loading...
Searching...
No Matches
Tasks\PlotSelectedCharStoryTracks.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# Script description:
7# Will plot all selected story tracks assigned to a character.
8#
9# Topic: FBStory, FBStoryTrack, FBCharacter, FBPlotOptions
10#
11
12from pyfbsdk import *
13
14lStory = FBStory()
15lScene = FBSystem().Scene
16lcharactersList = lScene.Characters
17
18
19# Set options for Plot process
20
21lOptions = FBPlotOptions()
22
23lOptions.ConstantKeyReducerKeepOneKey = True
24lOptions.PlotAllTakes = False
25lOptions.PlotOnFrame = True
26lOptions.PlotPeriod = FBTime( 0, 0, 0, 1 )
27lOptions.PlotTranslationOnRootOnly = True
28lOptions.PreciseTimeDiscontinuities = True
29lOptions.RotationFilterToApply = FBRotationFilter.kFBRotationFilterGimbleKiller
30lOptions.UseConstantKeyReducer = True
31
32
33for lTracks in lStory.RootFolder.Tracks:
34 if lTracks.Selected == True:
35 lCharacterIdx = lTracks.CharacterIndex
36 lCharacter = lcharactersList[lCharacterIdx - 1]
37 lCharacter.PlotAnimation (FBCharacterPlotWhere.kFBCharacterPlotOnSkeleton,lOptions )
38 lTracks.Mute = True
39
40
41for lFolders in lStory.RootFolder.Childs:
42 for lTracks in lFolders.Tracks:
43 if lTracks.Selected == True:
44 lCharacterIdx = lTracks.CharacterIndex
45 lCharacter = lcharactersList[lCharacterIdx - 1]
46 lCharacter.PlotAnimation (FBCharacterPlotWhere.kFBCharacterPlotOnSkeleton,lOptions )
47 lTracks.Mute = True
48
49
50
51
52
53
Option parameters for plotting.
Definition: pyfbsdk_generated.h:14130
Story Management class.
Definition: pyfbsdk_generated.h:17689
Provides access to the underlying system, and the MotionBuilder scene.
Definition: pyfbsdk_generated.h:18771
Time data structure.
Definition: pyfbsdk_generated.h:19596