diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 28 | ||||
-rw-r--r-- | source/blender/imbuf/intern/anim.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/RNA_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 24 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_props.h | 12 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 24 |
11 files changed, 45 insertions, 59 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 8ebf98ef930..a67bad44fdb 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -362,7 +362,7 @@ static AVFrame* generate_video_frame(uint8_t* pixels, ReportList *reports) } if (c->pix_fmt != PIX_FMT_BGR32) { - sws_scale(img_convert_ctx, (const uint8_t * const*) rgb_frame->data, + sws_scale(img_convert_ctx, (uint8_t **) rgb_frame->data, rgb_frame->linesize, 0, c->height, current_frame->data, current_frame->linesize); delete_picture(rgb_frame); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 8afed42758a..5f61da4ae37 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -2306,9 +2306,6 @@ void OBJECT_OT_game_property_copy(wmOperatorType *ot) static int game_property_clear_exec(bContext *C, wmOperator *op) { - Object *ob=ED_object_active_context(C); - bProperty *prop; - CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) { free_properties(&ob_iter->prop); } diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 235a5e00117..21da637fd7c 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -132,8 +132,7 @@ static void error(const char *dummy, ...) {} static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene, ARegion *ar, SpaceOops *soops, TreeElement *te, int startx, int *starty); static void outliner_do_object_operation(bContext *C, Scene *scene, SpaceOops *soops, ListBase *lb, void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *)); -static void outliner_do_group_operation(bContext *C, Scene *scene, SpaceOops *soops, ListBase *lb, - void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *)); + static int group_select_flag(Group *gr); /* ******************** PERSISTANT DATA ***************** */ @@ -3330,31 +3329,6 @@ static void outliner_do_data_operation(SpaceOops *soops, int type, int event, Li } } -static void outliner_do_group_operation(bContext *C, Scene *scene, SpaceOops *soops, ListBase *lb, - void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *)) - { - TreeElement *te; - TreeStoreElem *tselem; - - for(te=lb->first; te; te= te->next) { - tselem= TREESTORE(te); - if(tselem->flag & TSE_SELECTED) { - if(tselem->type==0 && te->idcode==ID_GR) { - /* when objects selected in other scenes... dunno if that should be allowed */ - Scene *sce= (Scene *)outliner_search_back(soops, te, ID_SCE); - if(sce && scene != sce) { - ED_screen_set_scene(C, sce); - } - - operation_cb(C, scene, te, NULL, tselem); - } - } - if((tselem->flag & TSE_CLOSED)==0) { - outliner_do_group_operation(C, scene, soops, &te->subtree, operation_cb); - } - } -} - void outliner_del(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops) { diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index 2cb63b7274c..67c443d051e 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -816,7 +816,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { unsigned char* top; sws_scale(anim->img_convert_ctx, - (const uint8_t * const *)input->data, + (uint8_t **)input->data, input->linesize, 0, anim->pCodecCtx->height, @@ -875,7 +875,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { unsigned char* r; sws_scale(anim->img_convert_ctx, - (const uint8_t * const *)input->data, + (uint8_t **)input->data, input->linesize, 0, anim->pCodecCtx->height, diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index 1f066a7209d..88058769f4b 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -118,6 +118,7 @@ typedef enum PropertySubType { PROP_QUATERNION = 27, PROP_AXISANGLE = 28, PROP_XYZ = 29, + PROP_XYZ_LENGTH = 29|PROP_UNIT_LENGTH, PROP_COLOR_GAMMA = 30, /* booleans */ diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 12c4bb79e37..633af83f603 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1630,7 +1630,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Scale", "Scaling of the object"); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update"); - prop= RNA_def_property(srna, "dimensions", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH); + prop= RNA_def_property(srna, "dimensions", PROP_FLOAT, PROP_XYZ_LENGTH); RNA_def_property_array(prop, 3); RNA_def_property_float_funcs(prop, "rna_Object_dimensions_get", "rna_Object_dimensions_set", NULL); RNA_def_property_ui_text(prop, "Dimensions", "Absolute bounding box dimensions of the object"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 79cc268a854..cf3c8c31121 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2907,7 +2907,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_ui_text(prop, "World", "World used for rendering the scene"); RNA_def_property_update(prop, NC_SCENE|NC_WORLD, NULL); - prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH); + prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH); RNA_def_property_float_sdna(prop, NULL, "cursor"); RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location"); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index a0f0f3d2f4d..67126d2157c 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -976,7 +976,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "localvd"); RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility"); - prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH); + prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH); RNA_def_property_array(prop, 3); RNA_def_property_float_funcs(prop, "rna_View3D_CursorLocation_get", "rna_View3D_CursorLocation_set", NULL); RNA_def_property_ui_text(prop, "3D Cursor Location", "3D cursor location for this view (dependent on local view setting)"); diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index 223b23a3dbd..3d7c0b133db 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -86,17 +86,19 @@ static PyObject *bpy_prop_deferred_return(void *func, PyObject *kw) return ret; } +#if 0 static int bpy_struct_id_used(StructRNA *srna, char *identifier) { PointerRNA ptr; RNA_pointer_create(NULL, srna, NULL, &ptr); return (RNA_struct_find_property(&ptr, identifier) != NULL); } +#endif /* Function that sets RNA, NOTE - self is NULL when called from python, but being abused from C so we can pass the srna allong * This isnt incorrect since its a python object - but be careful */ -static char BPy_BoolProperty_doc[] = +char BPy_BoolProperty_doc[] = ".. function:: BoolProperty(name=\"\", description=\"\", default=False, options={'ANIMATABLE'}, subtype='NONE')\n" "\n" " Returns a new boolean property definition.\n" @@ -162,7 +164,7 @@ PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw) } } -static char BPy_BoolVectorProperty_doc[] = +char BPy_BoolVectorProperty_doc[] = ".. function:: BoolVectorProperty(name=\"\", description=\"\", default=(False, False, False), options={'ANIMATABLE'}, subtype='NONE', size=3)\n" "\n" " Returns a new vector boolean property definition.\n" @@ -238,7 +240,7 @@ PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject *kw) } } -static char BPy_IntProperty_doc[] = +char BPy_IntProperty_doc[] = ".. function:: IntProperty(name=\"\", description=\"\", default=0, min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, step=1, options={'ANIMATABLE'}, subtype='NONE')\n" "\n" " Returns a new int property definition.\n" @@ -304,7 +306,7 @@ PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw) } } -static char BPy_IntVectorProperty_doc[] = +char BPy_IntVectorProperty_doc[] = ".. function:: IntVectorProperty(name=\"\", description=\"\", default=(0, 0, 0), min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, options={'ANIMATABLE'}, subtype='NONE', size=3)\n" "\n" " Returns a new vector int property definition.\n" @@ -382,7 +384,7 @@ PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject *kw) } -static char BPy_FloatProperty_doc[] = +char BPy_FloatProperty_doc[] = ".. function:: FloatProperty(name=\"\", description=\"\", default=0.0, min=sys.float_info.min, max=sys.float_info.max, soft_min=sys.float_info.min, soft_max=sys.float_info.max, step=3, precision=2, options={'ANIMATABLE'}, subtype='NONE', unit='NONE')\n" "\n" " Returns a new float property definition.\n" @@ -458,7 +460,7 @@ PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) } } -static char BPy_FloatVectorProperty_doc[] = +char BPy_FloatVectorProperty_doc[] = ".. function:: FloatVectorProperty(name=\"\", description=\"\", default=(0.0, 0.0, 0.0), min=sys.float_info.min, max=sys.float_info.max, soft_min=sys.float_info.min, soft_max=sys.float_info.max, step=3, precision=2, options={'ANIMATABLE'}, subtype='NONE', size=3)\n" "\n" " Returns a new vector float property definition.\n" @@ -535,7 +537,7 @@ PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObject *kw) } } -static char BPy_StringProperty_doc[] = +char BPy_StringProperty_doc[] = ".. function:: StringProperty(name=\"\", description=\"\", default=\"\", maxlen=0, options={'ANIMATABLE'}, subtype='NONE')\n" "\n" " Returns a new string property definition.\n" @@ -646,7 +648,7 @@ static EnumPropertyItem *enum_items_from_py(PyObject *value, const char *def, in return items; } -static char BPy_EnumProperty_doc[] = +char BPy_EnumProperty_doc[] = ".. function:: EnumProperty(items, name=\"\", description=\"\", default=\"\", options={'ANIMATABLE'})\n" "\n" " Returns a new enumerator property definition.\n" @@ -730,7 +732,7 @@ static StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix return srna; } -static char BPy_PointerProperty_doc[] = +char BPy_PointerProperty_doc[] = ".. function:: PointerProperty(items, type=\"\", description=\"\", default=\"\", options={'ANIMATABLE'})\n" "\n" " Returns a new pointer property definition.\n" @@ -790,7 +792,7 @@ PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; } -static char BPy_CollectionProperty_doc[] = +char BPy_CollectionProperty_doc[] = ".. function:: CollectionProperty(items, type=\"\", description=\"\", default=\"\", options={'ANIMATABLE'})\n" "\n" " Returns a new collection property definition.\n" @@ -850,7 +852,7 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw) return NULL; } -static char BPy_RemoveProperty_doc[] = +char BPy_RemoveProperty_doc[] = ".. function:: RemoveProperty(attr)\n" "\n" " Removes a dynamically defined property.\n" diff --git a/source/blender/python/intern/bpy_props.h b/source/blender/python/intern/bpy_props.h index 9382fc8115f..d90b12c0f91 100644 --- a/source/blender/python/intern/bpy_props.h +++ b/source/blender/python/intern/bpy_props.h @@ -43,6 +43,18 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw); PyObject *BPy_RemoveProperty(PyObject *self, PyObject *args, PyObject *kw); +extern char BPy_BoolProperty_doc[]; +extern char BPy_BoolVectorProperty_doc[]; +extern char BPy_IntProperty_doc[]; +extern char BPy_IntVectorProperty_doc[]; +extern char BPy_FloatProperty_doc[]; +extern char BPy_FloatVectorProperty_doc[]; +extern char BPy_StringProperty_doc[]; +extern char BPy_EnumProperty_doc[]; +extern char BPy_PointerProperty_doc[]; +extern char BPy_CollectionProperty_doc[];\ +extern char BPy_RemoveProperty_doc[]; + #define PYRNA_STACK_ARRAY 32 #endif diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 3aed5a8c7cc..841cb75bc98 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -204,7 +204,7 @@ int pyrna_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int return 0; } -#define PROP_ALL_VECTOR_SUBTYPES PROP_TRANSLATION: case PROP_DIRECTION: case PROP_VELOCITY: case PROP_ACCELERATION: case PROP_XYZ: case PROP_XYZ|PROP_UNIT_LENGTH +#define PROP_ALL_VECTOR_SUBTYPES PROP_TRANSLATION: case PROP_DIRECTION: case PROP_VELOCITY: case PROP_ACCELERATION: case PROP_XYZ: case PROP_XYZ_LENGTH PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop) { @@ -3790,18 +3790,18 @@ PyTypeObject pyrna_prop_collection_Type = { }; static struct PyMethodDef pyrna_struct_subtype_methods[] = { - {"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, ""}, - {"BoolVectorProperty", (PyCFunction)BPy_BoolVectorProperty, METH_VARARGS|METH_KEYWORDS, ""}, - {"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, ""}, - {"IntVectorProperty", (PyCFunction)BPy_IntVectorProperty, METH_VARARGS|METH_KEYWORDS, ""}, - {"FloatProperty", (PyCFunction)BPy_FloatProperty, METH_VARARGS|METH_KEYWORDS, ""}, - {"FloatVectorProperty", (PyCFunction)BPy_FloatVectorProperty, METH_VARARGS|METH_KEYWORDS, ""}, - {"StringProperty", (PyCFunction)BPy_StringProperty, METH_VARARGS|METH_KEYWORDS, ""}, - {"EnumProperty", (PyCFunction)BPy_EnumProperty, METH_VARARGS|METH_KEYWORDS, ""}, - {"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS|METH_KEYWORDS, ""}, - {"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS|METH_KEYWORDS, ""}, + {"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, BPy_BoolProperty_doc}, + {"BoolVectorProperty", (PyCFunction)BPy_BoolVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_BoolVectorProperty_doc}, + {"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, BPy_IntProperty_doc}, + {"IntVectorProperty", (PyCFunction)BPy_IntVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_IntVectorProperty_doc}, + {"FloatProperty", (PyCFunction)BPy_FloatProperty, METH_VARARGS|METH_KEYWORDS, BPy_FloatProperty_doc}, + {"FloatVectorProperty", (PyCFunction)BPy_FloatVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_FloatVectorProperty_doc}, + {"StringProperty", (PyCFunction)BPy_StringProperty, METH_VARARGS|METH_KEYWORDS, BPy_StringProperty_doc}, + {"EnumProperty", (PyCFunction)BPy_EnumProperty, METH_VARARGS|METH_KEYWORDS, BPy_EnumProperty_doc}, + {"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS|METH_KEYWORDS, BPy_PointerProperty_doc}, + {"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS|METH_KEYWORDS, BPy_CollectionProperty_doc}, - {"RemoveProperty", (PyCFunction)BPy_RemoveProperty, METH_VARARGS|METH_KEYWORDS, ""}, + {"RemoveProperty", (PyCFunction)BPy_RemoveProperty, METH_VARARGS|METH_KEYWORDS, BPy_RemoveProperty_doc}, // {"__get_rna", (PyCFunction)BPy_GetStructRNA, METH_NOARGS, ""}, {NULL, NULL, 0, NULL} |