diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-11 19:28:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-11 19:28:53 +0300 |
commit | bc6190f3e370d21aff0bd9d96fd43d92382c6466 (patch) | |
tree | 94bdbadbeb908085e86fd73b447df1ec1ed05858 /source/blender/blenkernel/BKE_group.h | |
parent | f24392805515416bdba35f531457183e67ef274c (diff) |
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()
Diffstat (limited to 'source/blender/blenkernel/BKE_group.h')
-rw-r--r-- | source/blender/blenkernel/BKE_group.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h index b66ddf13527..877e09b037f 100644 --- a/source/blender/blenkernel/BKE_group.h +++ b/source/blender/blenkernel/BKE_group.h @@ -42,8 +42,8 @@ void free_group(struct Group *group); void unlink_group(struct Group *group); struct Group *add_group(char *name); struct Group *copy_group(struct Group *group); -void add_to_group(struct Group *group, struct Object *ob); -int rem_from_group(struct Group *group, struct Object *ob); +int add_to_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base); +int rem_from_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base); struct Group *find_group(struct Object *ob, struct Group *group); int object_in_group(struct Object *ob, struct Group *group); int group_is_animated(struct Object *parent, struct Group *group); |