diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-26 13:09:31 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-26 13:09:31 +0400 |
commit | 18d2dd7e3ae0338829fd61740151f41c21668474 (patch) | |
tree | 53d755b496944c9017c2cda0ac812e7c545f4024 /source/blender/python | |
parent | fc9e0a37f0087d003808a87c26e46ed573ae39dd (diff) | |
parent | f1ed223e34e61777af46d33e5bfc2fc03223a689 (diff) |
Merging r55547 through r55594 from trunk into soc-2008-mxcurioni
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_app_ffmpeg.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_library.c | 10 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 7 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils.h | 4 |
4 files changed, 14 insertions, 9 deletions
diff --git a/source/blender/python/intern/bpy_app_ffmpeg.c b/source/blender/python/intern/bpy_app_ffmpeg.c index 3bf3dec3872..61e12c1cea0 100644 --- a/source/blender/python/intern/bpy_app_ffmpeg.c +++ b/source/blender/python/intern/bpy_app_ffmpeg.c @@ -81,8 +81,10 @@ static PyObject *make_ffmpeg_info(void) #define SetIntItem(flag) \ PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyLong_FromLong(flag)) #endif +#ifndef WITH_FFMPEG #define SetStrItem(str) \ PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyUnicode_FromString(str)) +#endif #define SetObjItem(obj) \ PyStructSequence_SET_ITEM(ffmpeg_info, pos++, obj) diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c index 3f66fb7b337..623d45dfd90 100644 --- a/source/blender/python/intern/bpy_library.c +++ b/source/blender/python/intern/bpy_library.c @@ -330,10 +330,10 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) mainl = BLO_library_append_begin(bmain, &(self->blo_handle), self->relpath); { - int i = 0, code; - while ((code = BKE_idcode_iter_step(&i))) { - if (BKE_idcode_is_linkable(code)) { - const char *name_plural = BKE_idcode_to_name_plural(code); + int idcode_step = 0, idcode; + while ((idcode = BKE_idcode_iter_step(&idcode_step))) { + if (BKE_idcode_is_linkable(idcode)) { + const char *name_plural = BKE_idcode_to_name_plural(idcode); PyObject *ls = PyDict_GetItemString(self->dict, name_plural); // printf("lib: %s\n", name_plural); if (ls && PyList_Check(ls)) { @@ -350,7 +350,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) // printf(" %s\n", item_str); if (item_str) { - ID *id = BLO_library_append_named_part(mainl, &(self->blo_handle), item_str, code); + ID *id = BLO_library_append_named_part(mainl, &(self->blo_handle), item_str, idcode); if (id) { #ifdef USE_RNA_DATABLOCKS PointerRNA id_ptr; diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index c330eb1549d..eef02285f3c 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -2527,13 +2527,16 @@ BPY_PROPDEF_DESC_DOC " :arg items: sequence of enum items formatted:\n" " [(identifier, name, description, icon, number), ...] where the identifier is used\n" " for python access and other values are used for the interface.\n" +" The three first elements of the tuples are mandatory.\n" +" The forth one is either the (unique!) number id of the item or, if followed by a fith element \n" +" (which must be the numid), an icon string identifier.\n" " Note the item is optional.\n" " For dynamic values a callback can be passed which returns a list in\n" " the same format as the static list.\n" " This function must take 2 arguments (self, context)\n" " WARNING: Do not use generators here (they will work the first time, but will lead to empty values\n" -" in some unload/reload scenarii)!\n" -" :type items: sequence of string triples or a function\n" +" in some unload/reload scenarii)!\n" +" :type items: sequence of string tuples or a function\n" BPY_PROPDEF_UPDATE_DOC ); static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw) diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h index 7b03b149459..142fcde8f1b 100644 --- a/source/blender/python/mathutils/mathutils.h +++ b/source/blender/python/mathutils/mathutils.h @@ -64,12 +64,12 @@ typedef struct { #include "mathutils_geometry.h" #include "mathutils_noise.h" -PyObject *BaseMathObject_owner_get(BaseMathObject * self, void *); +PyObject *BaseMathObject_owner_get(BaseMathObject *self, void *); PyObject *BaseMathObject_is_wrapped_get(BaseMathObject *self, void *); int BaseMathObject_traverse(BaseMathObject *self, visitproc visit, void *arg); int BaseMathObject_clear(BaseMathObject *self); -void BaseMathObject_dealloc(BaseMathObject * self); +void BaseMathObject_dealloc(BaseMathObject *self); PyMODINIT_FUNC PyInit_mathutils(void); |