diff options
Diffstat (limited to 'source/blender/python/intern/bpy_rna.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 3411bceda69..44e26a56db6 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -22,9 +22,14 @@ /** \file blender/python/intern/bpy_rna.c * \ingroup pythonintern + * + * This file is the main interface between python and blenders data api (RNA), + * exposing RNA to python so blender data can be accessed in a python like way. + * + * The two main types are 'BPy_StructRNA' and 'BPy_PropertyRNA' - the base + * classes for most of the data python accesses in blender. */ - #include <Python.h> #include <stddef.h> @@ -6470,7 +6475,9 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param const int is_operator= RNA_struct_is_a(ptr->type, &RNA_Operator); const char *func_id= RNA_function_identifier(func); /* testing, for correctness, not operator and not draw function */ - const short is_readonly= strstr("draw", func_id) || /*strstr("render", func_id) ||*/ !is_operator; + const short is_readonly= ((strncmp("draw", func_id, 4) ==0) || /* draw or draw_header */ + /*strstr("render", func_id) ||*/ + !is_operator); #endif py_class= RNA_struct_py_type_get(ptr->type); |