made scn.objects more flexible... you can now things like...

scn.objects.selected = [] # deselect all
scn.objects.selected = scn.objects # select all
scn.objects.context = [ob1, ob2...]

Added epydoc examples and updates importer scripts to use this de-select-all method.
This commit is contained in:
2006-12-28 11:09:36 +00:00
parent 356ea2ff28
commit 2feea3dcc3
9 changed files with 141 additions and 52 deletions

View File

@@ -311,8 +311,7 @@ def bvh_node_dict2objects(bvh_nodes, IMPORT_START_FRAME= 1):
IMPORT_START_FRAME= 1
scn= Blender.Scene.GetCurrent()
for ob in scn.objects:
ob.sel= 0
scn.objects.selected = []
objects= []
@@ -444,14 +443,10 @@ def bvh_node_dict2armature(bvh_nodes, IMPORT_START_FRAME= 1):
scn= Blender.Scene.GetCurrent()
for ob in scn.objects:
ob.sel= 0
scn.objects.selected = []
scn.link(arm_ob)
arm_ob.sel= 1
arm_ob.Layers= scn.Layers
scn.objects.context = [arm_ob]
# Now Apply the animation to the armature