From bc6190f3e370d21aff0bd9d96fd43d92382c6466 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2009 16:28:53 +0000 Subject: 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/python/intern/bpy_rna.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source/blender/python/intern/bpy_rna.h') diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index fe38ddb6bd9..0e40bf7258c 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -39,11 +39,9 @@ extern PyTypeObject pyrna_prop_Type; #define BPy_PropertyRNA_CheckExact(v) (Py_TYPE(v) == &pyrna_prop_Type) typedef struct { - void * _a; - void * _b; - PyTypeObject *py_type; -} BPy_StructFakeType; - + PyObject_HEAD /* required python macro */ + PointerRNA ptr; +} BPy_DummyPointerRNA; typedef struct { PyObject_HEAD /* required python macro */ -- cgit v1.2.3