# Copyright 2013 Autodesk, Inc. All rights reserved. # Use of this software is subject to the terms of the Autodesk license agreement # provided at the time of installation or download, or which otherwise accompanies # this software in either electronic or hard copy form. # # Script description: # Shows how story tracks (FBStoryTrack) can be organized into folders (FBStoryFolder), # and how FBStoryFolder can be manipulated, e.g., showing it as in collapsed/expanded view, # or making all tracks under it muted etc. # # Topic: FBStoryFolder, FBStoryTrack # from pyfbsdk import * # Bring up Story Tool to see the effects of this sample (e.g., via main menu, Window->Story) # Create three FBStoryFolder(s), two of which are children folder of the other one. lParentFolder = FBStoryFolder() lParentFolder.Label = 'My Parent Folder' lCollapsedFolder = FBStoryFolder( lParentFolder ) lCollapsedFolder.Label = 'Collapsed Child - Muted' lExpandedFolder = FBStoryFolder( lParentFolder ) lExpandedFolder.Label = 'Expanded Child - Solo' # Create some empty FBStoryTrack(s) to illustrate the collapsed/expanded folder view lExpandedFolder.Tracks.append( FBStoryTrack(FBStoryTrackType.kFBStoryTrackAnimation) ) lExpandedFolder.Tracks.append( FBStoryTrack(FBStoryTrackType.kFBStoryTrackAudio) ) lCollapsedFolder.Tracks.append( FBStoryTrack(FBStoryTrackType.kFBStoryTrackAnimation) ) lCollapsedFolder.Tracks.append( FBStoryTrack(FBStoryTrackType.kFBStoryTrackAudio) ) lCollapsedFolder.Collapsed = True # Mute the collapsed folder lCollapsedFolder.Mute = True # Make the expanded folder Solo lExpandedFolder.Solo = True