[Bf-python] Blender.Group

Campbell J Barton cbarton at metavr.com
Sun Mar 12 13:37:38 CET 2006


Hello Pythoners..
Ever since groups were added I wanted to use them - dupligroups esp!
But no python support means I cant use them for exporting to out engine...

To get to the point, I got stuck at LA airport and had a go at Blender.Group

Its small, but groups arnt that complex.

The module uses getsetattrs, and an iterator for objects, wich fits realy nice
with listbase's and general speedyness.

Syntax is as follows.

g= Group.Get('SomeGroup')
g.name= 'NewName'
for ob in g.objects: print ob.name

newob= Object.Get('myob')
g.objects.append(newob)

# Empty the group
for ob in g.objects:
  g.objects.remove(ob)


Setfaulting at the moment us Group.Unlink() and directly assigning lists to
g.objects.

ken/will- once its stabalized Ill submit a patch.
- Cam


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241 



More information about the Bf-python mailing list