python api for collection add()/remove()
authorCampbell Barton <ideasman42@gmail.com>
Wed, 11 Nov 2009 16:28:53 +0000 (16:28 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 11 Nov 2009 16:28:53 +0000 (16:28 +0000)
commitbc6190f3e370d21aff0bd9d96fd43d92382c6466
tree94bdbadbeb908085e86fd73b447df1ec1ed05858
parentf24392805515416bdba35f531457183e67ef274c
python api for collection add()/remove()

Added a group example
 C = bpy.context
 ob = C.active_object
 bpy.data.groups[0].objects.add(ob)

- add_to_group and rem_from_group now take optional scene and base flags and deal with updating the object & base flags
- operators that add objects to groups were setting ob->recalc= OB_RECALC_OB; looks like its not needed.
- previously add() ignored python args, now add and remove are called like any other FunctionRNA from python.
- made the pyrna api use tp_getset's for collestions active/add()/remove()
source/blender/blenkernel/BKE_group.h
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/object.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_group.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_group.c
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna.h