diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/armature/BIF_generate.h | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/editarmature_generate.c | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 29 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_add.c | 15 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_dopesheet_draw.c | 14 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 2 |
7 files changed, 34 insertions, 34 deletions
diff --git a/source/blender/editors/armature/BIF_generate.h b/source/blender/editors/armature/BIF_generate.h index 583178dd2b7..06ee3fbb64c 100644 --- a/source/blender/editors/armature/BIF_generate.h +++ b/source/blender/editors/armature/BIF_generate.h @@ -42,7 +42,7 @@ int nextAdaptativeSubdivision(struct ToolSettings *toolsettings, struct BArcIter struct EditBone *subdivideArcBy(struct ToolSettings *toolsettings, struct bArmature *arm, ListBase *editbones, struct BArcIterator *iter, float invmat[][4], float tmat[][3], NextSubdivisionFunc next_subdividion); -void setBoneRollFromNormal(struct EditBone *bone, float *no, float invmat[][4], float tmat[][3]); +void setBoneRollFromNormal(struct EditBone *bone, const float no[3], float invmat[][4], float tmat[][3]); #endif /* __BIF_GENERATE_H__ */ diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c index 7f966dbc884..23dd3b15476 100644 --- a/source/blender/editors/armature/editarmature_generate.c +++ b/source/blender/editors/armature/editarmature_generate.c @@ -50,7 +50,7 @@ #include "armature_intern.h" #include "BIF_generate.h" -void setBoneRollFromNormal(EditBone *bone, float *no, float UNUSED(invmat[][4]), float tmat[][3]) +void setBoneRollFromNormal(EditBone *bone, const float no[3], float UNUSED(invmat[][4]), float tmat[][3]) { if (no != NULL && !is_zero_v3(no)) { float normal[3]; diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 37ed8a6c7c8..522c387ddcf 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -120,18 +120,19 @@ void ED_object_toggle_modes(struct bContext *C, int mode); void ED_object_exit_editmode(struct bContext *C, int flag); void ED_object_enter_editmode(struct bContext *C, int flag); -void ED_object_location_from_view(struct bContext *C, float *loc); -void ED_object_rotation_from_view(struct bContext *C, float *rot); -void ED_object_base_init_transform(struct bContext *C, struct Base *base, float *loc, float *rot); -float ED_object_new_primitive_matrix(struct bContext *C, struct Object *editob, float *loc, float *rot, float primmat[][4]); +void ED_object_location_from_view(struct bContext *C, float loc[3]); +void ED_object_rotation_from_view(struct bContext *C, float rot[3]); +void ED_object_base_init_transform(struct bContext *C, struct Base *base, const float loc[3], const float rot[3]); +float ED_object_new_primitive_matrix(struct bContext *C, struct Object *editob, + const float loc[3], const float rot[3], float primmat[][4]); void ED_object_add_generic_props(struct wmOperatorType *ot, int do_editmode); int ED_object_add_generic_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, - float *loc, float *rot, int *enter_editmode, unsigned int *layer, int *is_view_aligned); +int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, float loc[3], float rot[3], + int *enter_editmode, unsigned int *layer, int *is_view_aligned); -struct Object *ED_object_add_type(struct bContext *C, int type, float *loc, - float *rot, int enter_editmode, unsigned int layer); +struct Object *ED_object_add_type(struct bContext *C, int type, const float loc[3], const float rot[3], + int enter_editmode, unsigned int layer); void ED_object_single_users(struct Main *bmain, struct Scene *scene, int full); void ED_object_single_user(struct Scene *scene, struct Object *ob); @@ -165,13 +166,17 @@ enum { MODIFIER_APPLY_SHAPE }; -struct ModifierData *ED_object_modifier_add(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, const char *name, int type); -int ED_object_modifier_remove(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, struct ModifierData *md); +struct ModifierData *ED_object_modifier_add(struct ReportList *reports, struct Main *bmain, struct Scene *scene, + struct Object *ob, const char *name, int type); +int ED_object_modifier_remove(struct ReportList *reports, struct Main *bmain, struct Scene *scene, + struct Object *ob, struct ModifierData *md); void ED_object_modifier_clear(struct Main *bmain, struct Scene *scene, struct Object *ob); int ED_object_modifier_move_down(struct ReportList *reports, struct Object *ob, struct ModifierData *md); int ED_object_modifier_move_up(struct ReportList *reports, struct Object *ob, struct ModifierData *md); -int ED_object_modifier_convert(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, struct ModifierData *md); -int ED_object_modifier_apply(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md, int mode); +int ED_object_modifier_convert(struct ReportList *reports, struct Main *bmain, struct Scene *scene, + struct Object *ob, struct ModifierData *md); +int ED_object_modifier_apply(struct ReportList *reports, struct Scene *scene, + struct Object *ob, struct ModifierData *md, int mode); int ED_object_modifier_copy(struct ReportList *reports, struct Object *ob, struct ModifierData *md); #ifdef __cplusplus diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 60c0ebbc7b3..f9eb8770012 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -55,7 +55,7 @@ /* uses context to figure out transform for primitive */ /* returns standard diameter */ -static float new_primitive_matrix(bContext *C, float *loc, float *rot, float primmat[][4]) +static float new_primitive_matrix(bContext *C, const float loc[3], const float rot[3], float primmat[][4]) { Object *obedit = CTX_data_edit_object(C); View3D *v3d = CTX_wm_view3d(C); @@ -85,7 +85,7 @@ static float new_primitive_matrix(bContext *C, float *loc, float *rot, float pri static void make_prim_init(bContext *C, const char *idname, float *dia, float mat[][4], - int *state, float *loc, float *rot, unsigned int layer) + int *state, const float loc[3], const float rot[3], const unsigned int layer) { Object *obedit = CTX_data_edit_object(C); diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 76967d61b9e..699b731bc15 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -120,7 +120,7 @@ EnumPropertyItem lamp_type_items[] = { /************************** Exported *****************************/ -void ED_object_location_from_view(bContext *C, float *loc) +void ED_object_location_from_view(bContext *C, float loc[3]) { View3D *v3d = CTX_wm_view3d(C); Scene *scene = CTX_data_scene(C); @@ -131,7 +131,7 @@ void ED_object_location_from_view(bContext *C, float *loc) copy_v3_v3(loc, cursor); } -void ED_object_rotation_from_view(bContext *C, float *rot) +void ED_object_rotation_from_view(bContext *C, float rot[3]) { RegionView3D *rv3d = CTX_wm_region_view3d(C); if (rv3d) { @@ -145,7 +145,7 @@ void ED_object_rotation_from_view(bContext *C, float *rot) } } -void ED_object_base_init_transform(bContext *C, Base *base, float *loc, float *rot) +void ED_object_base_init_transform(bContext *C, Base *base, const float loc[3], const float rot[3]) { Object *ob = base->object; Scene *scene = CTX_data_scene(C); @@ -163,7 +163,8 @@ void ED_object_base_init_transform(bContext *C, Base *base, float *loc, float *r /* uses context to figure out transform for primitive */ /* returns standard diameter */ -float ED_object_new_primitive_matrix(bContext *C, Object *obedit, float *loc, float *rot, float primmat[][4]) +float ED_object_new_primitive_matrix(bContext *C, Object *obedit, + const float loc[3], const float rot[3], float primmat[][4]) { View3D *v3d = CTX_wm_view3d(C); float mat[3][3], rmat[3][3], cmat[3][3], imat[3][3]; @@ -260,8 +261,8 @@ int ED_object_add_generic_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev return op->type->exec(C, op); } -int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc, - float *rot, int *enter_editmode, unsigned int *layer, int *is_view_aligned) +int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float loc[3], float rot[3], + int *enter_editmode, unsigned int *layer, int *is_view_aligned) { View3D *v3d = CTX_wm_view3d(C); int a, layer_values[20]; @@ -324,7 +325,7 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc, /* for object add primitive operators */ /* do not call undo push in this function (users of this function have to) */ -Object *ED_object_add_type(bContext *C, int type, float *loc, float *rot, +Object *ED_object_add_type(bContext *C, int type, const float loc[3], const float rot[3], int enter_editmode, unsigned int layer) { Main *bmain = CTX_data_main(C); diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c index 84209f7b744..e264d7f3885 100644 --- a/source/blender/editors/space_clip/clip_dopesheet_draw.c +++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c @@ -328,21 +328,15 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *ar) IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) { MovieTrackingTrack *track = channel->track; - uiBut *but; + const int icon = (track->flag & TRACK_LOCKED) ? ICON_LOCKED : ICON_UNLOCKED; PointerRNA ptr; - int icon; RNA_pointer_create(&clip->id, &RNA_MovieTrackingTrack, track, &ptr); - if (track->flag & TRACK_LOCKED) - icon = ICON_LOCKED; - else - icon = ICON_UNLOCKED; - uiBlockSetEmboss(block, UI_EMBOSSN); - but = uiDefIconButR(block, ICONTOG, 1, icon, - v2d->cur.xmax - UI_UNIT_X - CHANNEL_PAD, y - UI_UNIT_Y / 2.0f, - UI_UNIT_X, UI_UNIT_Y, &ptr, "lock", 0, 0, 0, 0, 0, NULL); + uiDefIconButR(block, ICONTOG, 1, icon, + v2d->cur.xmax - UI_UNIT_X - CHANNEL_PAD, y - UI_UNIT_Y / 2.0f, + UI_UNIT_X, UI_UNIT_Y, &ptr, "lock", 0, 0, 0, 0, 0, NULL); uiBlockSetEmboss(block, UI_EMBOSS); } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 1b06f42fd2c..a069194d868 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5393,7 +5393,7 @@ typedef struct TransDataTracking { } TransDataTracking; static void markerToTransDataInit(TransData *td, TransData2D *td2d, TransDataTracking *tdt, MovieTrackingTrack *track, - int area, float *loc, float *rel, float *off) + int area, float loc[2], float rel[2], const float off[2]) { int anchor = area == TRACK_AREA_POINT && off; |