diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-05 16:48:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-05 16:48:58 +0400 |
commit | 52d8e64b857530c85efb6e1c38b4b4fd40d9c345 (patch) | |
tree | 41083ff76cc35ffd34cbd13fce5c163f754033f2 /source/blender/python/intern/bpy_ui.c | |
parent | 13376a903b6167f26c04e14bad344374469fef25 (diff) |
PyRNA
- Support for python to convert a PyObject into a collection (uses a list of dicts - quite verbose :/)
- Operators can now take collection args when called from python.
- Support for printing operators that use collections (macro recording).
- Added RNA_pointer_as_string which prints all pointer prop values as a python dict.
Example that can run in the in test.py (F7 key)
bpy.ops.VIEW3D_OT_select_lasso(path=[{"loc":(0, 0), "time":0}, {"loc":(1000, 0), "time":0}, {"loc":(1000, 1000), "time":0}], type='SELECT')
for some reason lasso locations always print as 0,0. Need to look into why this is.
Diffstat (limited to 'source/blender/python/intern/bpy_ui.c')
-rw-r--r-- | source/blender/python/intern/bpy_ui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_ui.c b/source/blender/python/intern/bpy_ui.c index bbfb04719d8..c15315ca350 100644 --- a/source/blender/python/intern/bpy_ui.c +++ b/source/blender/python/intern/bpy_ui.c @@ -78,7 +78,7 @@ static PyObject *Method_defButO( PyObject * self, PyObject * args ) /* Optional python doctionary used to set python properties, just like how keyword args are used */ if (py_keywords && PyDict_Size(py_keywords)) { - if (PYOP_props_from_dict(uiButGetOperatorPtrRNA(but), py_keywords) == -1) + if (pyrna_pydict_to_props(uiButGetOperatorPtrRNA(but), py_keywords, "") == -1) return NULL; } @@ -296,7 +296,7 @@ static PyObject *Method_registerKey( PyObject * self, PyObject * args ) /* Optional python doctionary used to set python properties, just like how keyword args are used */ if (py_keywords && PyDict_Size(py_keywords)) { - if (PYOP_props_from_dict(km->ptr, py_keywords) == -1) + if (pyrna_pydict_to_props(km->ptr, py_keywords, "Registering keybinding") == -1) return NULL; } |