From 91352006c4ba8276ff2c7c8ae21461d16cf3f702 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 13 Nov 2009 16:08:03 +0000 Subject: arbitrary property and function support for rna properties (arrays and collections), this means functions can be easily added. eg. scene.objects.link() object.constraints.new() mesh.verts.transform(...) mesh.faces.active PropertyRNA stores an StructRNA pointer where these can be defined. --- source/blender/python/intern/bpy_operator_wrap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/python/intern/bpy_operator_wrap.c') diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c index 0aa6d8b6e6e..9b4f98aca8e 100644 --- a/source/blender/python/intern/bpy_operator_wrap.c +++ b/source/blender/python/intern/bpy_operator_wrap.c @@ -125,11 +125,11 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperatorType *ot, wmOperat } RNA_pointer_create(NULL, &RNA_Context, C, &ptr_context); - + if (mode==PYOP_INVOKE) { item= PyObject_GetAttrString(py_class, "invoke"); args = PyTuple_New(3); - + RNA_pointer_create(NULL, &RNA_Event, event, &ptr_event); // PyTuple_SET_ITEM "steals" object reference, it is @@ -149,9 +149,9 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperatorType *ot, wmOperat PyTuple_SET_ITEM(args, 1, pyrna_struct_CreatePyObject(&ptr_context)); } PyTuple_SET_ITEM(args, 0, py_class_instance); - + ret = PyObject_Call(item, args, NULL); - + Py_DECREF(args); Py_DECREF(item); Py_DECREF(class_dict); -- cgit v1.2.3