Python Reference Guide
 
Loading...
Searching...
No Matches
BasicOperations\FBFolder.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# Shows how to use FBFolder to organize datas in Navigator window
8#
9# Topic: FBFolder, FBPlug
10#
11
12from pyfbsdk import *
13
14# D I S C L A I M E R :
15# It is not possible to create a folder in the "Scene" element of the Navigator
16# It is the same limitation as MotionBuilder UI (right-click on Scene and see that
17# that NO "Insert Folder" item appear.
18
19# The second parameters to FBFolder is an object decide whose type
20# will decide which type of folder to create. This object will also
21# be added to the folder.
22
23cam1 = FBCamera("my cam")
24cam_folder = FBFolder("cam folder", cam1)
25
26light = FBLight("my light")
27light_folder = FBFolder("light folder", light)
28
29# If you want to add new elements to a folder you use connection methods:
30
31cam2 = FBCamera("my cam")
32cam3 = FBCamera("my cam")
33cam4 = FBCamera("my cam")
34
35# You can use Folder.ConnectSrc(object) to add "object" to "folder"
36cam_folder.ConnectSrc(cam2)
37
38# Or you can use Object.ConnectDst(folder) to add "object" to "folder"
39cam3.ConnectDst(cam_folder)
40
41# Or you can use Folder.Items.append to add "object" to "folder"
42cam_folder.Items.append(cam4)
Creates custom cameras and manages system cameras.
Definition: pyfbsdk_generated.h:2530
Folder class.
Definition: pyfbsdk_generated.h:8100
Light class.
Definition: pyfbsdk_generated.h:10092