Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-08-16 18:43:08 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2009-08-16 18:43:08 +0400
commitf250a92808a10f81abef1459223dbb5be40753b8 (patch)
treec564f0ca58639cb557cd74a97637f173ffdc5f72 /source/blender/windowmanager/intern/wm_operators.c
parent406d009269f50d02504aa3576c33e31d58b7112d (diff)
2.5/RNA:
* Added Context access to RNA_property_as_string. This is needed for doing a Python call to the object mode set operator, which has a dynamic enum property that needs context.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 41613d0ab78..dd4728d97af 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -345,7 +345,7 @@ void WM_operator_bl_idname(char *to, const char *from)
* When calling from an existing wmOperator do.
* WM_operator_pystring(op->type, op->ptr);
*/
-char *WM_operator_pystring(wmOperatorType *ot, PointerRNA *opptr, int all_args)
+char *WM_operator_pystring(bContext *C, wmOperatorType *ot, PointerRNA *opptr, int all_args)
{
const char *arg_name= NULL;
char idname_py[OP_MAX_TYPENAME];
@@ -378,7 +378,7 @@ char *WM_operator_pystring(wmOperatorType *ot, PointerRNA *opptr, int all_args)
if (strcmp(arg_name, "rna_type")==0) continue;
- buf= RNA_property_as_string(opptr, prop);
+ buf= RNA_property_as_string(C, opptr, prop);
ok= 1;
@@ -388,7 +388,7 @@ char *WM_operator_pystring(wmOperatorType *ot, PointerRNA *opptr, int all_args)
prop_default= RNA_struct_find_property(&opptr_default, arg_name);
if(prop_default) {
- buf_default= RNA_property_as_string(&opptr_default, prop_default);
+ buf_default= RNA_property_as_string(C, &opptr_default, prop_default);
if(strcmp(buf, buf_default)==0)
ok= 0; /* values match, dont bother printing */