diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-13 19:08:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-13 19:08:03 +0300 |
commit | 91352006c4ba8276ff2c7c8ae21461d16cf3f702 (patch) | |
tree | 6eb2a8d52e697c045eadca8e9e122e14dc73a4a6 /source/blender/python/intern/bpy_operator_wrap.c | |
parent | 6df83fba020c596aaf242271237f333d178e4c0e (diff) |
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.
Diffstat (limited to 'source/blender/python/intern/bpy_operator_wrap.c')
-rw-r--r-- | source/blender/python/intern/bpy_operator_wrap.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); |