diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-18 23:51:22 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-18 23:51:22 +0400 |
commit | 94dbb3bbdd612247f757d1962d2604737eb72f64 (patch) | |
tree | e9fc78550ef41d997c034d3281a8edc957a06c3f /source/blender/python/intern/bpy_util.c | |
parent | 4cd24cf05809557e0d620dccf1f19a570784f6fe (diff) |
2.5 Python
Merging changes made by Arystanbek in the soc-2009-kazanbas branch,
plus some things modified and added by me.
* Operator exec is called execute in python now, due to conflicts
with python exec keyword.
* Operator invoke/execute now get context argument.
* Fix crash executing operators due to bpy_import_main_set not being
set with Main pointer.
* The bpy.props module now has the FloatProperty/IntProperty/
StringProperty/BoolProperty functions to define RNA properties for
operators.
* Operators now have an __operator__ property to get the actual RNA
operator pointers, this is only temporary though.
* bpy.ops.add now allows the operator to be already registered, it
will simply overwrite the existing one.
* Both the ui and io directories are now scanned and run on startup.
Diffstat (limited to 'source/blender/python/intern/bpy_util.c')
-rw-r--r-- | source/blender/python/intern/bpy_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c index d5b131583dc..d837892fb4d 100644 --- a/source/blender/python/intern/bpy_util.c +++ b/source/blender/python/intern/bpy_util.c @@ -81,6 +81,7 @@ int BPY_flag_from_seq(BPY_flag_def *flagdef, PyObject *seq, int *flag) char *cstring; PyObject *item; BPY_flag_def *fd; + *flag = 0; if (PySequence_Check(seq)) { i= PySequence_Length(seq); @@ -108,6 +109,9 @@ int BPY_flag_from_seq(BPY_flag_def *flagdef, PyObject *seq, int *flag) error_val= 1; } + if (*flag == 0) + error_val = 1; + if (error_val) { char *buf = bpy_flag_error_str(flagdef); PyErr_SetString(PyExc_AttributeError, buf); |