LoneCanuck
04-26-2007, 02:57 PM
Hello,
I am trying to create a script that removes all the groups in a given scene. The groups look like this:
Main Group
...Geo Group
...Joint Group
...Null Group
So the Geo, Joint, and Null groups are nested under a Main Group
When I run this script:
======================
from pyfbsdk import *
lScene = FBSystem().Scene
allGroups = lScene.Groups
for group in allGroups:
...print group
...group.FBDelete()
del (group)
====================
The script stops after removing 2 groups. If I run it again, it removes one group. Run it again, and the last group is deleted. Is there any way to just remove all the groups in one pass?
-LoCK-
I am trying to create a script that removes all the groups in a given scene. The groups look like this:
Main Group
...Geo Group
...Joint Group
...Null Group
So the Geo, Joint, and Null groups are nested under a Main Group
When I run this script:
======================
from pyfbsdk import *
lScene = FBSystem().Scene
allGroups = lScene.Groups
for group in allGroups:
...print group
...group.FBDelete()
del (group)
====================
The script stops after removing 2 groups. If I run it again, it removes one group. Run it again, and the last group is deleted. Is there any way to just remove all the groups in one pass?
-LoCK-
