BasicOperations/DeletingGroups.py
Main Page
Groups
Classes
Examples
BasicOperations/DeletingGroups.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
# Delete all groups in the scene
8
#
9
# Topic: FBComponent, FBGroup, FBScene
10
#
11
12
from
pyfbsdk
import
FBSystem, FBComponent
13
14
# Create the list to store the groups in
15
lList = []
16
17
# Accessing the scene components to view all the groups
18
lScene =
FBSystem
().Scene
19
lGroups = lScene.Groups
20
21
# Append all the groups in the scene in a list
22
for
group
in
lGroups:
23
lList.append(group)
24
25
# map the the FBDelete class to each item in the list to delete
26
map( FBComponent.FBDelete, lList )
27
28
# Clean-up
29
del (FBSystem, FBComponent, lList, lScene, lGroups)