diff options
author | Yiming Wu <xp8110@outlook.com> | 2019-06-12 16:35:05 +0300 |
---|---|---|
committer | Yiming Wu <xp8110@outlook.com> | 2019-06-12 16:35:05 +0300 |
commit | e09dfe644ba10ecbb330dbb5ed8c1f1a3bfca251 (patch) | |
tree | f6f5329e7ffcbee774b1c3eae49463e9f8993675 /source/blender/editors | |
parent | 6034edfb416bd02da8d082a5c012fde4d65c0d59 (diff) | |
parent | 7a50d078fe4125788dfb084cd23a5164070fe69b (diff) |
Merge remote-tracking branch 'origin/master' into soc-2019-npr
# Conflicts:
# release/datafiles/locale
# release/scripts/addons
# release/scripts/addons_contrib
Diffstat (limited to 'source/blender/editors')
66 files changed, 474 insertions, 447 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index e5846e270f0..718e85c0e27 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -515,7 +515,7 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) * 2A) nla tracks: include animdata block's data as there are NLA tracks+strips there * 2B) actions to convert to nla: include animdata block's data as there is an action that can be * converted to a new NLA strip, and the filtering options allow this - * 2C) allow non-animated datablocks to be included so that datablocks can be added + * 2C) allow non-animated data-blocks to be included so that data-blocks can be added * 3) drivers: include drivers from animdata block (for Drivers mode in Graph Editor) * 4A) nla strip keyframes: these are the per-strip controls for time and influence * 4B) normal keyframes: only when there is an active action @@ -1618,7 +1618,7 @@ static size_t animfilter_block_data( AnimData *adt = BKE_animdata_from_id(id); size_t items = 0; - /* image object datablocks have no anim-data so check for NULL */ + /* image object data-blocks have no anim-data so check for NULL */ if (adt) { IdAdtTemplate *iat = (IdAdtTemplate *)id; @@ -1704,7 +1704,7 @@ static size_t animdata_filter_shapekey(bAnimContext *ac, return items; } -/* Helper for Grease Pencil - layers within a datablock */ +/* Helper for Grease Pencil - layers within a data-block. */ static size_t animdata_filter_gpencil_layers_data(ListBase *anim_data, bDopeSheet *ads, bGPdata *gpd, @@ -1737,7 +1737,7 @@ static size_t animdata_filter_gpencil_layers_data(ListBase *anim_data, return items; } -/* Helper for Grease Pencil - Grease Pencil datablock - GP Frames */ +/* Helper for Grease Pencil - Grease Pencil data-block - GP Frames. */ static size_t animdata_filter_gpencil_data(ListBase *anim_data, bDopeSheet *ads, bGPdata *gpd, @@ -1746,8 +1746,8 @@ static size_t animdata_filter_gpencil_data(ListBase *anim_data, size_t items = 0; /* When asked from "AnimData" blocks (i.e. the top-level containers for normal animation), - * for convenience, this will return GP Datablocks instead. This may cause issues down - * the track, but for now, this will do... + * for convenience, this will return GP Data-blocks instead. + * This may cause issues down the track, but for now, this will do. */ if (filter_mode & ANIMFILTER_ANIMDATA) { /* just add GPD as a channel - this will add everything needed */ @@ -1781,7 +1781,7 @@ static size_t animdata_filter_gpencil_data(ListBase *anim_data, return items; } -/* Grab all Grease Pencil datablocks in file */ +/* Grab all Grease Pencil data-blocks in file. */ // TODO: should this be amalgamated with the dopesheet filtering code? static size_t animdata_filter_gpencil(bAnimContext *ac, ListBase *anim_data, @@ -1847,7 +1847,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, } } - /* finally, include this object's grease pencil datablock */ + /* finally, include this object's grease pencil data-block. */ /* XXX: Should we store these under expanders per item? */ items += animdata_filter_gpencil_data(anim_data, ads, ob->data, filter_mode); } @@ -1856,7 +1856,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, else { bGPdata *gpd; - /* Grab all Grease Pencil datablocks directly from main, + /* Grab all Grease Pencil data-blocks directly from main, * but only those that seem to be useful somewhere */ for (gpd = ac->bmain->gpencils.first; gpd; gpd = gpd->id.next) { /* only show if gpd is used by something... */ @@ -1864,7 +1864,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, continue; } - /* add GP frames from this datablock */ + /* add GP frames from this data-block. */ items += animdata_filter_gpencil_data(anim_data, ads, gpd, filter_mode); } } @@ -1983,7 +1983,7 @@ static size_t animdata_filter_mask(Main *bmain, Mask *mask; size_t items = 0; - /* for now, grab mask datablocks directly from main */ + /* For now, grab mask data-blocks directly from main. */ // XXX: this is not good... for (mask = bmain->masks.first; mask; mask = mask->id.next) { ListBase tmp_data = {NULL, NULL}; @@ -2004,7 +2004,7 @@ static size_t animdata_filter_mask(Main *bmain, if (tmp_items) { /* include data-expand widget first */ if (filter_mode & ANIMFILTER_LIST_CHANNELS) { - /* add mask datablock as channel too (if for drawing, and it has layers) */ + /* add mask data-block as channel too (if for drawing, and it has layers) */ ANIMCHANNEL_NEW_CHANNEL(mask, ANIMTYPE_MASKDATABLOCK, NULL, NULL); } @@ -3030,7 +3030,7 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, int filter_m } /* if only F-Curves with visible flags set can be shown, check that - * datablock hasn't been set to invisible + * data-block hasn't been set to invisible. */ if (filter_mode & ANIMFILTER_CURVE_VISIBLE) { if ((ob->adt) && (ob->adt->flag & ADT_CURVES_NOT_VISIBLE)) { diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index 19fd521d7d9..f5bd7a47248 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -61,10 +61,10 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) } else if (ELEM(NULL, id, fcu, fcu->rna_path)) { if (fcu == NULL) { - strcpy(name, IFACE_("<invalid>")); + strcpy(name, TIP_("<invalid>")); } else if (fcu->rna_path == NULL) { - strcpy(name, IFACE_("<no path>")); + strcpy(name, TIP_("<no path>")); } else { /* id == NULL */ BLI_snprintf(name, 256, "%s[%d]", fcu->rna_path, fcu->array_index); diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index dec34eb04ac..2bbb8e5888c 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -772,14 +772,14 @@ static void ed_marker_move_update_header(bContext *C, wmOperator *op) /* we print current marker value */ if (use_time) { BLI_snprintf( - str, sizeof(str), IFACE_("Marker %.2f offset %s"), FRA2TIME(selmarker->frame), str_offs); + str, sizeof(str), TIP_("Marker %.2f offset %s"), FRA2TIME(selmarker->frame), str_offs); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Marker %d offset %s"), selmarker->frame, str_offs); + BLI_snprintf(str, sizeof(str), TIP_("Marker %d offset %s"), selmarker->frame, str_offs); } } else { - BLI_snprintf(str, sizeof(str), IFACE_("Marker offset %s"), str_offs); + BLI_snprintf(str, sizeof(str), TIP_("Marker offset %s"), str_offs); } ED_area_status_text(CTX_wm_area(C), str); diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index fe079eb59a0..7ca0f95d6c4 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -182,7 +182,7 @@ static int add_driver_with_target(ReportList *UNUSED(reports), /* Set driver expression, so that the driver works out of the box * - * The following checks define a bit of "autodetection magic" we use + * The following checks define a bit of "auto-detection magic" we use * to ensure that the drivers will behave as expected out of the box * when faced with properties with different units. */ diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 884a8c20b19..f8328e9f07f 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -334,7 +334,7 @@ static short summary_keyframes_loop(KeyframeEditData *ked, case ALE_FCURVE: default: { if (ked && ked->iterflags) { - /* make backups of the current values, so that a localised fix + /* make backups of the current values, so that a localized fix * (e.g. NLA time remapping) can be applied to these values */ float f1 = ked->f1; diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 27076f84c7f..5d424594229 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -367,71 +367,73 @@ void armature_tag_unselect(bArmature *arm) /* ------------------------------------- */ -/* if editbone (partial) selected, copy data */ -/* context; editmode armature, with mirror editing enabled */ -void ED_armature_edit_transform_mirror_update(Object *obedit) -{ - bArmature *arm = obedit->data; - EditBone *ebo, *eboflip; - - for (ebo = arm->edbo->first; ebo; ebo = ebo->next) { - /* no layer check, correct mirror is more important */ - if (ebo->flag & (BONE_TIPSEL | BONE_ROOTSEL)) { - eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebo); - - if (eboflip) { - /* we assume X-axis flipping for now */ - if (ebo->flag & BONE_TIPSEL) { - EditBone *children; - - eboflip->tail[0] = -ebo->tail[0]; - eboflip->tail[1] = ebo->tail[1]; - eboflip->tail[2] = ebo->tail[2]; - eboflip->rad_tail = ebo->rad_tail; - eboflip->roll = -ebo->roll; - eboflip->curve_out_x = -ebo->curve_out_x; - eboflip->roll2 = -ebo->roll2; - - /* Also move connected children, in case children's name aren't mirrored properly */ - for (children = arm->edbo->first; children; children = children->next) { - if (children->parent == eboflip && children->flag & BONE_CONNECTED) { - copy_v3_v3(children->head, eboflip->tail); - children->rad_head = ebo->rad_tail; - } +void ED_armature_ebone_transform_mirror_update(bArmature *arm, EditBone *ebo, bool check_select) +{ + /* no layer check, correct mirror is more important */ + if (!check_select || ebo->flag & (BONE_TIPSEL | BONE_ROOTSEL)) { + EditBone *eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebo); + if (eboflip) { + /* we assume X-axis flipping for now */ + if (check_select && ebo->flag & BONE_TIPSEL) { + EditBone *children; + + eboflip->tail[0] = -ebo->tail[0]; + eboflip->tail[1] = ebo->tail[1]; + eboflip->tail[2] = ebo->tail[2]; + eboflip->rad_tail = ebo->rad_tail; + eboflip->roll = -ebo->roll; + eboflip->curve_out_x = -ebo->curve_out_x; + eboflip->roll2 = -ebo->roll2; + + /* Also move connected children, in case children's name aren't mirrored properly */ + for (children = arm->edbo->first; children; children = children->next) { + if (children->parent == eboflip && children->flag & BONE_CONNECTED) { + copy_v3_v3(children->head, eboflip->tail); + children->rad_head = ebo->rad_tail; } } - if (ebo->flag & BONE_ROOTSEL) { - eboflip->head[0] = -ebo->head[0]; - eboflip->head[1] = ebo->head[1]; - eboflip->head[2] = ebo->head[2]; - eboflip->rad_head = ebo->rad_head; - eboflip->roll = -ebo->roll; - eboflip->curve_in_x = -ebo->curve_in_x; - eboflip->roll1 = -ebo->roll1; - - /* Also move connected parent, in case parent's name isn't mirrored properly */ - if (eboflip->parent && eboflip->flag & BONE_CONNECTED) { - EditBone *parent = eboflip->parent; - copy_v3_v3(parent->tail, eboflip->head); - parent->rad_tail = ebo->rad_head; - } - } - if (ebo->flag & BONE_SELECTED) { - eboflip->dist = ebo->dist; - eboflip->roll = -ebo->roll; - eboflip->xwidth = ebo->xwidth; - eboflip->zwidth = ebo->zwidth; - - eboflip->curve_in_x = -ebo->curve_in_x; - eboflip->curve_out_x = -ebo->curve_out_x; - eboflip->roll1 = -ebo->roll1; - eboflip->roll2 = -ebo->roll2; + } + if (!check_select || ebo->flag & BONE_ROOTSEL) { + eboflip->head[0] = -ebo->head[0]; + eboflip->head[1] = ebo->head[1]; + eboflip->head[2] = ebo->head[2]; + eboflip->rad_head = ebo->rad_head; + eboflip->roll = -ebo->roll; + eboflip->curve_in_x = -ebo->curve_in_x; + eboflip->roll1 = -ebo->roll1; + + /* Also move connected parent, in case parent's name isn't mirrored properly */ + if (eboflip->parent && eboflip->flag & BONE_CONNECTED) { + EditBone *parent = eboflip->parent; + copy_v3_v3(parent->tail, eboflip->head); + parent->rad_tail = ebo->rad_head; } } + if (!check_select || ebo->flag & BONE_SELECTED) { + eboflip->dist = ebo->dist; + eboflip->roll = -ebo->roll; + eboflip->xwidth = ebo->xwidth; + eboflip->zwidth = ebo->zwidth; + + eboflip->curve_in_x = -ebo->curve_in_x; + eboflip->curve_out_x = -ebo->curve_out_x; + eboflip->roll1 = -ebo->roll1; + eboflip->roll2 = -ebo->roll2; + } } } } +/* if editbone (partial) selected, copy data */ +/* context; editmode armature, with mirror editing enabled */ +void ED_armature_edit_transform_mirror_update(Object *obedit) +{ + bArmature *arm = obedit->data; + for (EditBone *ebo = arm->edbo->first; ebo; ebo = ebo->next) { + ED_armature_ebone_transform_mirror_update(arm, ebo, true); + } +} + /* *************************************************************** */ /* Armature EditMode Conversions */ diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 96ba6212992..3407b3e6b7f 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -1171,8 +1171,8 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) /* do header print - if interactively previewing */ if (pld->state == PL_PREVIEW_RUNNING) { if (pld->flag & PL_PREVIEW_SHOWORIGINAL) { - ED_area_status_text(pld->sa, IFACE_("PoseLib Previewing Pose: [Showing Original Pose]")); - ED_workspace_status_text(C, IFACE_("Use Tab to start previewing poses again")); + ED_area_status_text(pld->sa, TIP_("PoseLib Previewing Pose: [Showing Original Pose]")); + ED_workspace_status_text(C, TIP_("Use Tab to start previewing poses again")); } else if (pld->searchstr[0]) { char tempstr[65]; @@ -1196,17 +1196,17 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) BLI_snprintf(pld->headerstr, sizeof(pld->headerstr), - IFACE_("PoseLib Previewing Pose: Filter - [%s] | " - "Current Pose - \"%s\""), + TIP_("PoseLib Previewing Pose: Filter - [%s] | " + "Current Pose - \"%s\""), tempstr, markern); ED_area_status_text(pld->sa, pld->headerstr); - ED_workspace_status_text(C, IFACE_("Use ScrollWheel or PageUp/Down to change pose")); + ED_workspace_status_text(C, TIP_("Use ScrollWheel or PageUp/Down to change pose")); } else { BLI_snprintf(pld->headerstr, sizeof(pld->headerstr), - IFACE_("PoseLib Previewing Pose: \"%s\""), + TIP_("PoseLib Previewing Pose: \"%s\""), pld->marker->name); ED_area_status_text(pld->sa, pld->headerstr); ED_workspace_status_text(C, NULL); diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index 9bc204c9e3b..97317a86104 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -27,6 +27,8 @@ #include "BLI_blenlib.h" #include "BLI_dlrbTree.h" +#include "BLT_translation.h" + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_object_types.h" @@ -829,35 +831,35 @@ static void pose_slide_draw_status(tPoseSlideOp *pso) switch (pso->mode) { case POSESLIDE_PUSH: - strcpy(mode_str, "Push Pose"); + strcpy(mode_str, TIP_("Push Pose")); break; case POSESLIDE_RELAX: - strcpy(mode_str, "Relax Pose"); + strcpy(mode_str, TIP_("Relax Pose")); break; case POSESLIDE_BREAKDOWN: - strcpy(mode_str, "Breakdown"); + strcpy(mode_str, TIP_("Breakdown")); break; default: /* unknown */ - strcpy(mode_str, "Sliding-Tool"); + strcpy(mode_str, TIP_("Sliding-Tool")); break; } switch (pso->axislock) { case PS_LOCK_X: - BLI_strncpy(axis_str, "[X]/Y/Z axis only (X to clear)", sizeof(axis_str)); + BLI_strncpy(axis_str, TIP_("[X]/Y/Z axis only (X to clear)"), sizeof(axis_str)); break; case PS_LOCK_Y: - BLI_strncpy(axis_str, "X/[Y]/Z axis only (Y to clear)", sizeof(axis_str)); + BLI_strncpy(axis_str, TIP_("X/[Y]/Z axis only (Y to clear)"), sizeof(axis_str)); break; case PS_LOCK_Z: - BLI_strncpy(axis_str, "X/Y/[Z] axis only (Z to clear)", sizeof(axis_str)); + BLI_strncpy(axis_str, TIP_("X/Y/[Z] axis only (Z to clear)"), sizeof(axis_str)); break; default: if (ELEM(pso->channels, PS_TFM_LOC, PS_TFM_ROT, PS_TFM_SIZE)) { - BLI_strncpy(axis_str, "X/Y/Z = Axis Constraint", sizeof(axis_str)); + BLI_strncpy(axis_str, TIP_("X/Y/Z = Axis Constraint"), sizeof(axis_str)); } else { axis_str[0] = '\0'; @@ -869,31 +871,34 @@ static void pose_slide_draw_status(tPoseSlideOp *pso) case PS_TFM_LOC: BLI_snprintf(limits_str, sizeof(limits_str), - "[G]/R/S/B/C - Location only (G to clear) | %s", + TIP_("[G]/R/S/B/C - Location only (G to clear) | %s"), axis_str); break; case PS_TFM_ROT: BLI_snprintf(limits_str, sizeof(limits_str), - "G/[R]/S/B/C - Rotation only (R to clear) | %s", + TIP_("G/[R]/S/B/C - Rotation only (R to clear) | %s"), axis_str); break; case PS_TFM_SIZE: - BLI_snprintf( - limits_str, sizeof(limits_str), "G/R/[S]/B/C - Scale only (S to clear) | %s", axis_str); + BLI_snprintf(limits_str, + sizeof(limits_str), + TIP_("G/R/[S]/B/C - Scale only (S to clear) | %s"), + axis_str); break; case PS_TFM_BBONE_SHAPE: BLI_strncpy(limits_str, - "G/R/S/[B]/C - Bendy Bone properties only (B to clear) | %s", + TIP_("G/R/S/[B]/C - Bendy Bone properties only (B to clear) | %s"), sizeof(limits_str)); break; case PS_TFM_PROPS: BLI_strncpy(limits_str, - "G/R/S/B/[C] - Custom Properties only (C to clear) | %s", + TIP_("G/R/S/B/[C] - Custom Properties only (C to clear) | %s"), sizeof(limits_str)); break; default: - BLI_strncpy(limits_str, "G/R/S/B/C - Limit to Transform/Property Set", sizeof(limits_str)); + BLI_strncpy( + limits_str, TIP_("G/R/S/B/C - Limit to Transform/Property Set"), sizeof(limits_str)); break; } diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 73230e5fb0e..5962d95c5af 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -1688,8 +1688,8 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p) /* Provide usage tips, since this is modal, and unintuitive without hints */ ED_workspace_status_text( C, - IFACE_("Annotation Create Poly: LMB click to place next stroke vertex | " - "ESC/Enter to end (or click outside this area)")); + TIP_("Annotation Create Poly: LMB click to place next stroke vertex | " + "ESC/Enter to end (or click outside this area)")); break; default: /* Do nothing - the others are self explanatory, exit quickly once the mouse is released @@ -1704,29 +1704,29 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p) switch (p->paintmode) { case GP_PAINTMODE_ERASER: ED_workspace_status_text(C, - IFACE_("Annotation Eraser: Hold and drag LMB or RMB to erase | " - "ESC/Enter to end (or click outside this area)")); + TIP_("Annotation Eraser: Hold and drag LMB or RMB to erase | " + "ESC/Enter to end (or click outside this area)")); break; case GP_PAINTMODE_DRAW_STRAIGHT: ED_workspace_status_text(C, - IFACE_("Annotation Line Draw: Hold and drag LMB to draw | " - "ESC/Enter to end (or click outside this area)")); + TIP_("Annotation Line Draw: Hold and drag LMB to draw | " + "ESC/Enter to end (or click outside this area)")); break; case GP_PAINTMODE_DRAW: ED_workspace_status_text(C, - IFACE_("Annotation Freehand Draw: Hold and drag LMB to draw | " - "E/ESC/Enter to end (or click outside this area)")); + TIP_("Annotation Freehand Draw: Hold and drag LMB to draw | " + "E/ESC/Enter to end (or click outside this area)")); break; case GP_PAINTMODE_DRAW_POLY: ED_workspace_status_text( C, - IFACE_("Annotation Create Poly: LMB click to place next stroke vertex | " - "ESC/Enter to end (or click outside this area)")); + TIP_("Annotation Create Poly: LMB click to place next stroke vertex | " + "ESC/Enter to end (or click outside this area)")); break; default: /* unhandled future cases */ ED_workspace_status_text( - C, IFACE_("Annotation Session: ESC/Enter to end (or click outside this area)")); + C, TIP_("Annotation Session: ESC/Enter to end (or click outside this area)")); break; } break; diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c index 068a77b769c..08f752bb72e 100644 --- a/source/blender/editors/gpencil/gpencil_armature.c +++ b/source/blender/editors/gpencil/gpencil_armature.c @@ -15,11 +15,12 @@ * * The Original Code is Copyright (C) 2018, Blender Foundation * This is a new part of Blender - * Operators for dealing with armatures and GP datablocks */ /** \file * \ingroup edgpencil + * + * Operators for dealing with armatures and GP data-blocks. */ #include <stdio.h> diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 3274f9657db..f5b27d8268d 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -1182,9 +1182,9 @@ static void gpsculpt_brush_header_set(bContext *C, tGP_BrushEditData *gso) BLI_snprintf(str, sizeof(str), - IFACE_("GPencil Sculpt: %s Stroke | LMB to paint | RMB/Escape to Exit" - " | Ctrl to Invert Action | Wheel Up/Down for Size " - " | Shift-Wheel Up/Down for Strength"), + TIP_("GPencil Sculpt: %s Stroke | LMB to paint | RMB/Escape to Exit" + " | Ctrl to Invert Action | Wheel Up/Down for Size " + " | Shift-Wheel Up/Down for Strength"), (brush_name) ? brush_name : "<?>"); ED_workspace_status_text(C, str); @@ -2130,6 +2130,7 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even return OPERATOR_RUNNING_MODAL; } +/* Also used for weight paint. */ void GPENCIL_OT_sculpt_paint(wmOperatorType *ot) { /* identifiers */ diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index ca5c8ae70e4..a7072facf36 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -15,11 +15,12 @@ * * The Original Code is Copyright (C) 2008, Blender Foundation * This is a new part of Blender - * Operators for dealing with GP datablocks and layers */ /** \file * \ingroup edgpencil + * + * Operators for dealing with GP data-blocks and layers. */ #include <stdio.h> @@ -539,7 +540,7 @@ static int gp_layer_duplicate_object_exec(bContext *C, wmOperator *op) Material *ma_src = give_current_material(ob_src, gps_src->mat_nr + 1); int idx = BKE_gpencil_object_material_ensure(bmain, ob_dst, ma_src); - /* reasign the stroke material to the right slot in destination object */ + /* Reassign the stroke material to the right slot in destination object. */ gps_dst->mat_nr = idx; /* add new stroke to frame */ @@ -1077,7 +1078,7 @@ static int gp_isolate_layer_exec(bContext *C, wmOperator *op) } /* Set/Clear flags as appropriate */ - /* TODO: Include onionskinning on this list? */ + /* TODO: Include onion-skinning on this list? */ if (isolate) { /* Set flags on all "other" layers */ for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { @@ -2322,7 +2323,7 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op) for (bGPDframe *gpf = gpl_new->frames.first; gpf; gpf = gpf->next) { for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { - /* reasign material. Look old material and try to find in dst */ + /* Reassign material. Look old material and try to find in destination. */ ma_src = give_current_material(ob_src, gps->mat_nr + 1); gps->mat_nr = BKE_gpencil_object_material_ensure(bmain, ob_dst, ma_src); diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 9366eb6bc2b..9588d4bb570 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -994,7 +994,7 @@ ListBase gp_strokes_copypastebuf = {NULL, NULL}; /* Hash for hanging on to all the colors used by strokes in the buffer * - * This is needed to prevent dangling and unsafe pointers when pasting across datablocks, + * This is needed to prevent dangling and unsafe pointers when pasting across data-blocks, * or after a color used by a stroke in the buffer gets deleted (via user action or undo). */ static GHash *gp_strokes_copypastebuf_colors = NULL; @@ -4026,7 +4026,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op) /* make copy of source stroke */ bGPDstroke *gps_dst = BKE_gpencil_stroke_duplicate(gps); - /* reasign material */ + /* Reassign material. */ gps_dst->mat_nr = idx; /* link to destination frame */ @@ -4052,7 +4052,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op) gps->prev = gps->next = NULL; /* relink to destination frame */ BLI_addtail(&gpf_dst->strokes, gps); - /* reasign material */ + /* Reassign material. */ gps->mat_nr = idx; } } diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index bf15b846bb6..df27198922c 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -1141,7 +1141,7 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf) /* Helper: Draw status message while the user is running the operator */ static void gpencil_fill_status_indicators(bContext *C, tGPDfill *UNUSED(tgpf)) { - const char *status_str = IFACE_("Fill: ESC/RMB cancel, LMB Fill, Shift Draw on Back"); + const char *status_str = TIP_("Fill: ESC/RMB cancel, LMB Fill, Shift Draw on Back"); ED_workspace_status_text(C, status_str); } diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c index d83cc7858bd..8a9f7c1224a 100644 --- a/source/blender/editors/gpencil/gpencil_interpolate.c +++ b/source/blender/editors/gpencil/gpencil_interpolate.c @@ -377,7 +377,7 @@ static void gpencil_interpolate_status_indicators(bContext *C, tGPDinterpolate * char status_str[UI_MAX_DRAW_STR]; char msg_str[UI_MAX_DRAW_STR]; - BLI_strncpy(msg_str, IFACE_("GPencil Interpolation: "), UI_MAX_DRAW_STR); + BLI_strncpy(msg_str, TIP_("GPencil Interpolation: "), UI_MAX_DRAW_STR); if (hasNumInput(&p->num)) { char str_offs[NUM_STR_REP_LEN]; @@ -395,7 +395,7 @@ static void gpencil_interpolate_status_indicators(bContext *C, tGPDinterpolate * ED_area_status_text(p->sa, status_str); ED_workspace_status_text( - C, IFACE_("ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/MOVE to adjust factor")); + C, TIP_("ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/MOVE to adjust factor")); } /* Update screen and stroke */ diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 14bb955cf84..041704d8473 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -2480,22 +2480,21 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p) case GP_PAINTMODE_ERASER: { ED_workspace_status_text( C, - IFACE_("Grease Pencil Erase Session: Hold and drag LMB or RMB to erase | " - "ESC/Enter to end (or click outside this area)")); + TIP_("Grease Pencil Erase Session: Hold and drag LMB or RMB to erase | " + "ESC/Enter to end (or click outside this area)")); break; } case GP_PAINTMODE_DRAW_STRAIGHT: { - ED_workspace_status_text( - C, - IFACE_("Grease Pencil Line Session: Hold and drag LMB to draw | " - "ESC/Enter to end (or click outside this area)")); + ED_workspace_status_text(C, + TIP_("Grease Pencil Line Session: Hold and drag LMB to draw | " + "ESC/Enter to end (or click outside this area)")); break; } case GP_PAINTMODE_SET_CP: { ED_workspace_status_text( C, - IFACE_("Grease Pencil Guides: LMB click and release to place reference point | " - "Esc/RMB to cancel")); + TIP_("Grease Pencil Guides: LMB click and release to place reference point | " + "Esc/RMB to cancel")); break; } case GP_PAINTMODE_DRAW: { @@ -2503,26 +2502,26 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p) if (guide->use_guide) { ED_workspace_status_text( C, - IFACE_("Grease Pencil Freehand Session: Hold and drag LMB to draw | " - "M key to flip guide | O key to move reference point")); + TIP_("Grease Pencil Freehand Session: Hold and drag LMB to draw | " + "M key to flip guide | O key to move reference point")); } else { ED_workspace_status_text( - C, IFACE_("Grease Pencil Freehand Session: Hold and drag LMB to draw")); + C, TIP_("Grease Pencil Freehand Session: Hold and drag LMB to draw")); } break; } case GP_PAINTMODE_DRAW_POLY: { ED_workspace_status_text( C, - IFACE_("Grease Pencil Poly Session: LMB click to place next stroke vertex | " - "Release Shift/ESC/Enter to end (or click outside this area)")); + TIP_("Grease Pencil Poly Session: LMB click to place next stroke vertex | " + "Release Shift/ESC/Enter to end (or click outside this area)")); break; } default: /* unhandled future cases */ { ED_workspace_status_text( - C, IFACE_("Grease Pencil Session: ESC/Enter to end (or click outside this area)")); + C, TIP_("Grease Pencil Session: ESC/Enter to end (or click outside this area)")); break; } } diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index d6497e6e58e..b10801fc87f 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -400,32 +400,32 @@ static void gpencil_primitive_status_indicators(bContext *C, tGPDprimitive *tgpi if (tgpi->type == GP_STROKE_LINE) { BLI_strncpy(msg_str, - IFACE_("Line: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- to " - "adjust subdivision number, Shift to align, Alt to center, E: extrude"), + TIP_("Line: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- to " + "adjust subdivision number, Shift to align, Alt to center, E: extrude"), UI_MAX_DRAW_STR); } else if (tgpi->type == GP_STROKE_BOX) { BLI_strncpy(msg_str, - IFACE_("Rectangle: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- " - "to adjust subdivision number, Shift to square, Alt to center"), + TIP_("Rectangle: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- " + "to adjust subdivision number, Shift to square, Alt to center"), UI_MAX_DRAW_STR); } else if (tgpi->type == GP_STROKE_CIRCLE) { BLI_strncpy(msg_str, - IFACE_("Circle: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge " - "number, Shift to square, Alt to center"), + TIP_("Circle: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge " + "number, Shift to square, Alt to center"), UI_MAX_DRAW_STR); } else if (tgpi->type == GP_STROKE_ARC) { BLI_strncpy(msg_str, - IFACE_("Arc: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge number, " - "Shift to square, Alt to center, M: Flip, E: extrude"), + TIP_("Arc: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge number, " + "Shift to square, Alt to center, M: Flip, E: extrude"), UI_MAX_DRAW_STR); } else if (tgpi->type == GP_STROKE_CURVE) { BLI_strncpy(msg_str, - IFACE_("Curve: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge " - "number, Shift to square, Alt to center, E: extrude"), + TIP_("Curve: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge " + "number, Shift to square, Alt to center, E: extrude"), UI_MAX_DRAW_STR); } diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 3eb277ad776..aca59e2868f 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -216,6 +216,9 @@ void ED_armature_ebone_to_mat4(EditBone *ebone, float mat[4][4]); void ED_armature_ebone_from_mat3(EditBone *ebone, float mat[3][3]); void ED_armature_ebone_from_mat4(EditBone *ebone, float mat[4][4]); +void ED_armature_ebone_transform_mirror_update(struct bArmature *arm, + EditBone *ebo, + bool check_select); void ED_armature_edit_transform_mirror_update(struct Object *obedit); void ED_armature_origin_set( struct Main *bmain, struct Object *ob, const float cursor[3], int centermode, int around); diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 85e5ea1aee4..e59431d265d 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -7182,8 +7182,10 @@ void UI_but_tooltip_refresh(bContext *C, uiBut *but) } } -/* removes tooltip timer from active but - * (meaning tooltip is disabled until it's reenabled again) */ +/** + * Removes tool-tip timer from active but + * (meaning tool-tip is disabled until it's re-enabled again). + */ void UI_but_tooltip_timer_remove(bContext *C, uiBut *but) { uiHandleButtonData *data; @@ -8511,7 +8513,7 @@ static void ui_handle_button_return_submenu(bContext *C, const wmEvent *event, u /** * Function used to prevent losing the open menu when using nested pull-downs, - * when moving mouse towards the pulldown menu over other buttons that could + * when moving mouse towards the pull-down menu over other buttons that could * steal the highlight from the current button, only checks: * * - while mouse moves in triangular area defined old mouse position and diff --git a/source/blender/editors/interface/interface_query.c b/source/blender/editors/interface/interface_query.c index b0fd0cdc35f..462183b4245 100644 --- a/source/blender/editors/interface/interface_query.c +++ b/source/blender/editors/interface/interface_query.c @@ -528,8 +528,8 @@ bool ui_region_contains_point_px(const ARegion *ar, int x, int y) return false; } - /* also, check that with view2d, that the mouse is not over the scrollbars - * NOTE: care is needed here, since the mask rect may include the scrollbars + /* also, check that with view2d, that the mouse is not over the scroll-bars + * NOTE: care is needed here, since the mask rect may include the scroll-bars * even when they are not visible, so we need to make a copy of the mask to * use to check */ diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c index 6c780482777..9d1b6fc92fc 100644 --- a/source/blender/editors/interface/interface_region_tooltip.c +++ b/source/blender/editors/interface/interface_region_tooltip.c @@ -657,7 +657,7 @@ static uiTooltipData *ui_tooltip_data_from_button(bContext *C, uiBut *but) .style = UI_TIP_STYLE_NORMAL, .color_id = UI_TIP_LC_NORMAL, }); - field->text = BLI_strdup(IFACE_("(Shift-Click/Drag to select multiple)")); + field->text = BLI_strdup(TIP_("(Shift-Click/Drag to select multiple)")); } } /* Enum field label & tip */ diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index e1d3bd736e7..4efa024ac77 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1723,7 +1723,7 @@ void uiTemplatePathBuilder(uiLayout *layout, /************************ Modifier Template *************************/ -#define ERROR_LIBDATA_MESSAGE IFACE_("Can't edit external library data") +#define ERROR_LIBDATA_MESSAGE TIP_("Can't edit external library data") static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v) { @@ -2550,7 +2550,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) /* Set but-locks for protected settings (magic numbers are used here!) */ if (proxy_protected) { - UI_block_lock_set(block, true, IFACE_("Cannot edit Proxy-Protected Constraint")); + UI_block_lock_set(block, true, TIP_("Cannot edit Proxy-Protected Constraint")); } /* Draw constraint data */ @@ -3079,7 +3079,7 @@ static void colorband_update_cb(bContext *UNUSED(C), void *bt_v, void *coba_v) uiBut *bt = bt_v; ColorBand *coba = coba_v; - /* sneaky update here, we need to sort the colorband points to be in order, + /* Sneaky update here, we need to sort the color-band points to be in order, * however the RNA pointer then is wrong, so we update it */ BKE_colorband_update_sort(coba); bt->rnapoin.data = coba->data + coba->cur; diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index f654fbcdc1e..6c9c36c0d7f 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1654,7 +1654,7 @@ float UI_text_clip_middle_ex(const uiFontStyle *fstyle, if ((okwidth > 0.0f) && (strwidth > okwidth)) { /* utf8 two-dots leader '..' (shorter than ellipsis '...'), - * some compilers complain with real litteral string. */ + * some compilers complain with real literal string. */ const char sep[] = {0xe2, 0x80, 0xA5, 0x0}; const int sep_len = sizeof(sep) - 1; const float sep_strwidth = BLF_width(fstyle->uifont_id, sep, sep_len + 1); @@ -3800,7 +3800,7 @@ static void widget_swatch( if (state & (UI_BUT_DISABLED | UI_BUT_INACTIVE)) { /* Now we reduce alpha of the inner color (i.e. the color shown) * so that this setting can look grayed out, while retaining - * the checkboard (for transparent values). This is needed + * the checkerboard (for transparent values). This is needed * here as the effects of ui_widget_color_disabled() are overwritten. */ wcol->inner[3] /= 2; diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 26beb08dd28..cbda4767722 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -247,8 +247,7 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) cp = ts->header; break; case TH_HEADERDESEL: - /* we calculate a dynamic builtin header deselect color, - * also for pulldowns... */ + /* We calculate a dynamic builtin header deselect color, also for pull-downs. */ cp = ts->header; headerdesel[0] = cp[0] > 10 ? cp[0] - 10 : 0; headerdesel[1] = cp[1] > 10 ? cp[1] - 10 : 0; diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 8931060abee..7d9b722fcc0 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -2031,7 +2031,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, const wmEvent * const char in_scroller = UI_view2d_mouse_in_scrollers(ar, v2d, event->x, event->y); /* if in a scroller, init customdata then set modal handler which will - * catch mousedown to start doing useful stuff */ + * catch mouse-down to start doing useful stuff */ if (in_scroller) { v2dScrollerMove *vsm; diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 5a7a84dbbc8..a205f6878e3 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -288,7 +288,7 @@ bool ED_mask_feather_find_nearest(const bContext *C, uw = NULL; } else { - uw = &cur_point_eval->uw[j - 1]; + uw = &cur_point_orig->uw[j - 1]; } point_masklay = masklay_orig; diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index 28153dc7716..78b4cfe38d4 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -169,19 +169,19 @@ static void edbm_bevel_update_header(bContext *C, wmOperator *op) BLI_snprintf(header, sizeof(header), - IFACE_("%s: confirm, " - "%s: cancel, " - "%s: mode (%s), " - "%s: width (%s), " - "%s: segments (%d), " - "%s: profile (%.3f), " - "%s: clamp overlap (%s), " - "%s: vertex only (%s), " - "%s: outer miter (%s), " - "%s: inner miter (%s), " - "%s: harden normals (%s), " - "%s: mark seam (%s), " - "%s: mark sharp (%s)"), + TIP_("%s: confirm, " + "%s: cancel, " + "%s: mode (%s), " + "%s: width (%s), " + "%s: segments (%d), " + "%s: profile (%.3f), " + "%s: clamp overlap (%s), " + "%s: vertex only (%s), " + "%s: outer miter (%s), " + "%s: inner miter (%s), " + "%s: harden normals (%s), " + "%s: mark seam (%s), " + "%s: mark sharp (%s)"), WM_MODALKEY(BEV_MODAL_CONFIRM), WM_MODALKEY(BEV_MODAL_CANCEL), WM_MODALKEY(BEV_MODAL_OFFSET_MODE_CHANGE), diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c index 1d173d8e396..283e147b77b 100644 --- a/source/blender/editors/mesh/editmesh_bisect.c +++ b/source/blender/editors/mesh/editmesh_bisect.c @@ -170,7 +170,7 @@ static int mesh_bisect_invoke(bContext *C, wmOperator *op, const wmEvent *event) v3d->gizmo_flag = V3D_GIZMO_HIDE; /* Initialize modal callout. */ - ED_workspace_status_text(C, IFACE_("LMB: Click and drag to draw cut line")); + ED_workspace_status_text(C, TIP_("LMB: Click and drag to draw cut line")); } MEM_freeN(objects); return ret; @@ -202,7 +202,7 @@ static int mesh_bisect_modal(bContext *C, wmOperator *op, const wmEvent *event) /* update or clear modal callout */ if (event->type == EVT_MODAL_MAP) { if (event->val == GESTURE_MODAL_BEGIN) { - ED_workspace_status_text(C, IFACE_("LMB: Release to confirm cut line")); + ED_workspace_status_text(C, TIP_("LMB: Release to confirm cut line")); } else { ED_workspace_status_text(C, NULL); diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c index 9c7b234028c..1413e0db41d 100644 --- a/source/blender/editors/mesh/editmesh_inset.c +++ b/source/blender/editors/mesh/editmesh_inset.c @@ -80,7 +80,7 @@ static void edbm_inset_update_header(wmOperator *op, bContext *C) { InsetData *opdata = op->customdata; - const char *str = IFACE_( + const char *str = TIP_( "Confirm: Enter/LClick, Cancel: (Esc/RClick), Thickness: %s, " "Depth (Ctrl to tweak): %s (%s), Outset (O): (%s), Boundary (B): (%s), Individual (I): " "(%s)"); diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 976dbe01a22..bb584094580 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -280,11 +280,11 @@ static void knife_update_header(bContext *C, wmOperator *op, KnifeTool_OpData *k BLI_snprintf(header, sizeof(header), - IFACE_("%s: confirm, %s: cancel, " - "%s: start/define cut, %s: close cut, %s: new cut, " - "%s: midpoint snap (%s), %s: ignore snap (%s), " - "%s: angle constraint (%s), %s: cut through (%s), " - "%s: panning"), + TIP_("%s: confirm, %s: cancel, " + "%s: start/define cut, %s: close cut, %s: new cut, " + "%s: midpoint snap (%s), %s: ignore snap (%s), " + "%s: angle constraint (%s), %s: cut through (%s), " + "%s: panning"), WM_MODALKEY(KNF_MODAL_CONFIRM), WM_MODALKEY(KNF_MODAL_CANCEL), WM_MODALKEY(KNF_MODAL_ADD_CUT), diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 59355890428..c7606758b63 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -451,8 +451,8 @@ static int loopcut_init(bContext *C, wmOperator *op, const wmEvent *event) if (is_interactive) { ED_workspace_status_text( C, - IFACE_("Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, " - "hold Alt for smooth")); + TIP_("Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, " + "hold Alt for smooth")); return OPERATOR_RUNNING_MODAL; } else { @@ -668,7 +668,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event) } BLI_snprintf(buf, sizeof(buf), - IFACE_("Number of Cuts: %s, Smooth: %s (Alt)"), + TIP_("Number of Cuts: %s, Smooth: %s (Alt)"), str_rep, str_rep + NUM_STR_REP_LEN); ED_workspace_status_text(C, buf); diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 60c6994eb2e..97bdb3a7a5d 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -7719,11 +7719,11 @@ static void point_normals_update_header(bContext *C, wmOperator *op) BLI_snprintf(header, sizeof(header), - IFACE_("%s: confirm, %s: cancel, " - "%s: point to mouse (%s), %s: point to Pivot, " - "%s: point to object origin, %s: reset normals, " - "%s: set & point to 3D cursor, %s: select & point to mesh item, " - "%s: invert normals (%s), %s: spherize (%s), %s: align (%s)"), + TIP_("%s: confirm, %s: cancel, " + "%s: point to mouse (%s), %s: point to Pivot, " + "%s: point to object origin, %s: reset normals, " + "%s: set & point to 3D cursor, %s: select & point to mesh item, " + "%s: invert normals (%s), %s: spherize (%s), %s: align (%s)"), WM_MODALKEY(EDBM_CLNOR_MODAL_CONFIRM), WM_MODALKEY(EDBM_CLNOR_MODAL_CANCEL), WM_MODALKEY(EDBM_CLNOR_MODAL_POINTTO_USE_MOUSE), diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 0b9ced84a59..99c3d7da2a2 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1417,6 +1417,7 @@ void OBJECT_OT_collection_instance_add(wmOperatorType *ot) static int object_speaker_add_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); Object *ob; ushort local_view_bits; float loc[3], rot[3]; @@ -1434,7 +1435,7 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op) /* create new data for NLA hierarchy */ AnimData *adt = BKE_animdata_add_id(&ob->id); NlaTrack *nlt = BKE_nlatrack_add(adt, NULL); - NlaStrip *strip = BKE_nla_add_soundstrip(scene, ob->data); + NlaStrip *strip = BKE_nla_add_soundstrip(bmain, scene, ob->data); strip->start = CFRA; strip->end += strip->start; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index f748fd247ee..1446ea23bb8 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -29,19 +29,20 @@ #include "DNA_anim_types.h" #include "DNA_armature_types.h" -#include "DNA_mesh_types.h" +#include "DNA_camera_types.h" #include "DNA_collection_types.h" #include "DNA_constraint_types.h" +#include "DNA_gpencil_types.h" #include "DNA_light_types.h" #include "DNA_lattice_types.h" #include "DNA_material_types.h" +#include "DNA_mesh_types.h" #include "DNA_meta_types.h" +#include "DNA_object_types.h" #include "DNA_particle_types.h" #include "DNA_scene_types.h" -#include "DNA_world_types.h" -#include "DNA_object_types.h" #include "DNA_vfont_types.h" -#include "DNA_gpencil_types.h" +#include "DNA_world_types.h" #include "BLI_math.h" #include "BLI_listbase.h" @@ -1852,7 +1853,7 @@ static void single_obdata_users( { Light *la; Curve *cu; - /* Camera *cam; */ + Camera *cam; Mesh *me; Lattice *lat; ID *id; @@ -1869,7 +1870,8 @@ static void single_obdata_users( ob->data = la = ID_NEW_SET(ob->data, BKE_light_copy(bmain, ob->data)); break; case OB_CAMERA: - ob->data = ID_NEW_SET(ob->data, BKE_camera_copy(bmain, ob->data)); + cam = ob->data = ID_NEW_SET(ob->data, BKE_camera_copy(bmain, ob->data)); + ID_NEW_REMAP(cam->dof.focus_object); break; case OB_MESH: /* Needed to remap texcomesh below. */ diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 1e85c895f71..0d92e1ae378 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -418,21 +418,21 @@ static void make_renderinfo_string(const RenderStats *rs, /* local view */ if (rs->localview) { - spos += sprintf(spos, "%s | ", IFACE_("3D Local View")); + spos += sprintf(spos, "%s | ", TIP_("3D Local View")); } else if (v3d_override) { - spos += sprintf(spos, "%s | ", IFACE_("3D View")); + spos += sprintf(spos, "%s | ", TIP_("3D View")); } /* frame number */ - spos += sprintf(spos, IFACE_("Frame:%d "), (scene->r.cfra)); + spos += sprintf(spos, TIP_("Frame:%d "), (scene->r.cfra)); /* previous and elapsed time */ BLI_timecode_string_from_time_simple(info_time_str, sizeof(info_time_str), rs->lastframetime); if (rs->infostr && rs->infostr[0]) { if (rs->lastframetime != 0.0) { - spos += sprintf(spos, IFACE_("| Last:%s "), info_time_str); + spos += sprintf(spos, TIP_("| Last:%s "), info_time_str); } else { spos += sprintf(spos, "| "); @@ -445,7 +445,7 @@ static void make_renderinfo_string(const RenderStats *rs, spos += sprintf(spos, "| "); } - spos += sprintf(spos, IFACE_("Time:%s "), info_time_str); + spos += sprintf(spos, TIP_("Time:%s "), info_time_str); /* statistics */ if (rs->statstr) { @@ -459,43 +459,43 @@ static void make_renderinfo_string(const RenderStats *rs, } if (rs->totvert) { - spos += sprintf(spos, IFACE_("Ve:%d "), rs->totvert); + spos += sprintf(spos, TIP_("Ve:%d "), rs->totvert); } if (rs->totface) { - spos += sprintf(spos, IFACE_("Fa:%d "), rs->totface); + spos += sprintf(spos, TIP_("Fa:%d "), rs->totface); } if (rs->tothalo) { - spos += sprintf(spos, IFACE_("Ha:%d "), rs->tothalo); + spos += sprintf(spos, TIP_("Ha:%d "), rs->tothalo); } if (rs->totstrand) { - spos += sprintf(spos, IFACE_("St:%d "), rs->totstrand); + spos += sprintf(spos, TIP_("St:%d "), rs->totstrand); } if (rs->totlamp) { - spos += sprintf(spos, IFACE_("Li:%d "), rs->totlamp); + spos += sprintf(spos, TIP_("Li:%d "), rs->totlamp); } if (rs->mem_peak == 0.0f) { spos += sprintf(spos, - IFACE_("| Mem:%.2fM (%.2fM, Peak %.2fM) "), + TIP_("| Mem:%.2fM (%.2fM, Peak %.2fM) "), megs_used_memory, mmap_used_memory, megs_peak_memory); } else { - spos += sprintf(spos, IFACE_("| Mem:%.2fM, Peak: %.2fM "), rs->mem_used, rs->mem_peak); + spos += sprintf(spos, TIP_("| Mem:%.2fM, Peak: %.2fM "), rs->mem_used, rs->mem_peak); } if (rs->curfield) { - spos += sprintf(spos, IFACE_("Field %d "), rs->curfield); + spos += sprintf(spos, TIP_("Field %d "), rs->curfield); } if (rs->curblur) { - spos += sprintf(spos, IFACE_("Blur %d "), rs->curblur); + spos += sprintf(spos, TIP_("Blur %d "), rs->curblur); } } /* full sample */ if (rs->curfsa) { - spos += sprintf(spos, IFACE_("| Full Sample %d "), rs->curfsa); + spos += sprintf(spos, TIP_("| Full Sample %d "), rs->curfsa); } /* extra info */ diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 845f60e9ad1..110dc7aaaf1 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -51,6 +51,7 @@ #include "BKE_writeavi.h" #include "DEG_depsgraph.h" +#include "DEG_depsgraph_query.h" #include "DRW_engine.h" @@ -798,11 +799,12 @@ static bool screen_opengl_render_anim_initialize(bContext *C, wmOperator *op) oglrender->movie_ctx_arr = MEM_mallocN(sizeof(void *) * oglrender->totvideos, "Movies"); for (i = 0; i < oglrender->totvideos; i++) { + Scene *scene_eval = DEG_get_evaluated_scene(oglrender->depsgraph); const char *suffix = BKE_scene_multiview_view_id_suffix_get(&scene->r, i); oglrender->movie_ctx_arr[i] = oglrender->mh->context_create(); if (!oglrender->mh->start_movie(oglrender->movie_ctx_arr[i], - scene, + scene_eval, &scene->r, oglrender->sizex, oglrender->sizey, diff --git a/source/blender/editors/screen/screen_user_menu.c b/source/blender/editors/screen/screen_user_menu.c index 08b9d010f79..86be939d41b 100644 --- a/source/blender/editors/screen/screen_user_menu.c +++ b/source/blender/editors/screen/screen_user_menu.c @@ -289,8 +289,8 @@ static void screen_user_menu_draw(const bContext *C, Menu *menu) } if (is_empty) { - uiItemL(menu->layout, IFACE_("No menu items found"), ICON_NONE); - uiItemL(menu->layout, IFACE_("Right click on buttons to add them to this menu"), ICON_NONE); + uiItemL(menu->layout, TIP_("No menu items found"), ICON_NONE); + uiItemL(menu->layout, TIP_("Right click on buttons to add them to this menu"), ICON_NONE); } } diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 2bbb99b2b67..41dfd6f68c3 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -952,10 +952,10 @@ static void sample_color_update_header(SampleColorData *data, bContext *C) if (sa) { BLI_snprintf(msg, sizeof(msg), - IFACE_("Sample color for %s"), + TIP_("Sample color for %s"), !data->sample_palette ? - IFACE_("Brush. Use Left Click to sample for palette instead") : - IFACE_("Palette. Use Left Click to sample more colors")); + TIP_("Brush. Use Left Click to sample for palette instead") : + TIP_("Palette. Use Left Click to sample more colors")); ED_workspace_status_text(C, msg); } } diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index bae79d5ea60..6f20b853881 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3912,7 +3912,7 @@ static void proj_paint_state_thread_init(ProjPaintState *ps, const bool reset_th /* Thread stuff * - * very small brushes run a lot slower multithreaded since the advantage with + * very small brushes run a lot slower multi-threaded since the advantage with * threads is being able to fill in multiple buckets at once. * Only use threads for bigger brushes. */ @@ -5104,7 +5104,7 @@ static void image_paint_partial_redraw_expand(ImagePaintPartialRedraw *cell, cell->y2 = max_ii(cell->y2, (int)projPixel->y_px + 1); } -/* run this for single and multithreaded painting */ +/* Run this for single and multi-threaded painting. */ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool), void *ph_v, int UNUSED(threadid)) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 0e18e5eb343..c902b6a0551 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -6398,7 +6398,7 @@ static int sculpt_sample_detail_size_exec(bContext *C, wmOperator *op) static int sculpt_sample_detail_size_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(e)) { - ED_workspace_status_text(C, "Click on the mesh to set the detail"); + ED_workspace_status_text(C, TIP_("Click on the mesh to set the detail")); WM_cursor_modal_set(CTX_wm_window(C), BC_EYEDROPPER_CURSOR); WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index fc2970f4c31..7cc222ea529 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -1739,7 +1739,7 @@ static void mouse_action_keys(bAnimContext *ac, if (column) { /* select all keyframes in the same frame as the one we hit on the active channel * [T41077]: "frame" not "selx" here (i.e. no NLA corrections yet) as the code here - * does that itself again as it needs to work on multiple datablocks + * does that itself again as it needs to work on multiple data-blocks. */ actkeys_mselect_column(ac, select_mode, frame); } diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index b9b83abf670..87ea011e0a7 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -483,7 +483,7 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C) user = ct->user; if (!user) { - uiItemL(layout, IFACE_("No textures in context"), ICON_NONE); + uiItemL(layout, TIP_("No textures in context"), ICON_NONE); return; } diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index 2496b16ffae..45707d74d2e 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -814,27 +814,27 @@ void uiTemplateMovieclipInformation(uiLayout *layout, /* Display frame dimensions, channels number and byffer type. */ BKE_movieclip_get_size(clip, user, &width, &height); - ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, IFACE_("%d x %d"), width, height); + ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, TIP_("%d x %d"), width, height); if (ibuf) { if (ibuf->rect_float) { if (ibuf->channels != 4) { ofs += BLI_snprintf( - str + ofs, sizeof(str) - ofs, IFACE_(", %d float channel(s)"), ibuf->channels); + str + ofs, sizeof(str) - ofs, TIP_(", %d float channel(s)"), ibuf->channels); } else if (ibuf->planes == R_IMF_PLANES_RGBA) { - ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", RGBA float"), sizeof(str) - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGBA float"), sizeof(str) - ofs); } else { - ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", RGB float"), sizeof(str) - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGB float"), sizeof(str) - ofs); } } else { if (ibuf->planes == R_IMF_PLANES_RGBA) { - ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", RGBA byte"), sizeof(str) - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGBA byte"), sizeof(str) - ofs); } else { - ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", RGB byte"), sizeof(str) - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGB byte"), sizeof(str) - ofs); } } @@ -843,12 +843,12 @@ void uiTemplateMovieclipInformation(uiLayout *layout, float frs_sec_base; if (IMB_anim_get_fps(clip->anim, &frs_sec, &frs_sec_base, true)) { ofs += BLI_snprintf( - str + ofs, sizeof(str) - ofs, IFACE_(", %.2f fps"), (float)frs_sec / frs_sec_base); + str + ofs, sizeof(str) - ofs, TIP_(", %.2f fps"), (float)frs_sec / frs_sec_base); } } } else { - ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", failed to load"), sizeof(str) - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_(", failed to load"), sizeof(str) - ofs); } uiItemL(col, str, ICON_NONE); @@ -856,10 +856,10 @@ void uiTemplateMovieclipInformation(uiLayout *layout, /* Display current frame number. */ framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, user->framenr); if (framenr <= clip->len) { - BLI_snprintf(str, sizeof(str), IFACE_("Frame: %d / %d"), framenr, clip->len); + BLI_snprintf(str, sizeof(str), TIP_("Frame: %d / %d"), framenr, clip->len); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Frame: - / %d"), clip->len); + BLI_snprintf(str, sizeof(str), TIP_("Frame: - / %d"), clip->len); } uiItemL(col, str, ICON_NONE); @@ -876,7 +876,7 @@ void uiTemplateMovieclipInformation(uiLayout *layout, file = "-"; } - BLI_snprintf(str, sizeof(str), IFACE_("File: %s"), file); + BLI_snprintf(str, sizeof(str), TIP_("File: %s"), file); uiItemL(col, str, ICON_NONE); } diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 2de01e0b7ec..d8d50ba72b5 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -152,7 +152,7 @@ void CLIP_OT_add_marker(wmOperatorType *ot) static int add_marker_at_click_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { - ED_workspace_status_text(C, IFACE_("Use LMB click to define location where place the marker")); + ED_workspace_status_text(C, TIP_("Use LMB click to define location where place the marker")); /* Add modal handler for ESC. */ WM_event_add_modal_handler(C, op); diff --git a/source/blender/editors/space_clip/tracking_ops_track.c b/source/blender/editors/space_clip/tracking_ops_track.c index e7880331331..e9a685f9e21 100644 --- a/source/blender/editors/space_clip/tracking_ops_track.c +++ b/source/blender/editors/space_clip/tracking_ops_track.c @@ -44,6 +44,8 @@ #include "PIL_time.h" +#include "DEG_depsgraph.h" + #include "clip_intern.h" // own include #include "tracking_ops_intern.h" @@ -271,6 +273,7 @@ static void track_markers_endjob(void *tmv) BKE_autotrack_context_sync(tmj->context); BKE_autotrack_context_finish(tmj->context); + DEG_id_tag_update(&tmj->clip->id, ID_RECALC_COPY_ON_WRITE); WM_main_add_notifier(NC_SCENE | ND_FRAME, tmj->scene); } @@ -426,6 +429,7 @@ static int refine_marker_exec(bContext *C, wmOperator *op) } } + DEG_id_tag_update(&clip->id, ID_RECALC_COPY_ON_WRITE); WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index f2d1b6eab83..9004eaa7bf6 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -2094,7 +2094,7 @@ static bool file_is_blend_backup(const char *str) } /* TODO: Maybe we should move this to BLI? - * On the other hand, it's using defines from spacefile area, so not sure... */ + * On the other hand, it's using defines from space-file area, so not sure... */ int ED_path_extension_type(const char *path) { if (BLO_has_bfile_extension(path)) { diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 3b1e70b8db7..cdb5e672f4a 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -952,29 +952,28 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, block = uiLayoutGetBlock(col); if (driver->flag & DRIVER_FLAG_INVALID) { - uiItemL(col, IFACE_("ERROR: Invalid Python expression"), ICON_CANCEL); + uiItemL(col, TIP_("ERROR: Invalid Python expression"), ICON_CANCEL); } else if (!BKE_driver_has_simple_expression(driver)) { if ((G.f & G_FLAG_SCRIPT_AUTOEXEC) == 0) { /* TODO: Add button to enable? */ - uiItemL(col, IFACE_("WARNING: Python expressions limited for security"), ICON_ERROR); + uiItemL(col, TIP_("WARNING: Python expressions limited for security"), ICON_ERROR); } else { - uiItemL(col, IFACE_("Slow Python expression"), ICON_INFO); + uiItemL(col, TIP_("Slow Python expression"), ICON_INFO); } } /* Explicit bpy-references are evil. Warn about these to prevent errors */ /* TODO: put these in a box? */ if (bpy_data_expr_error || bpy_ctx_expr_error) { - uiItemL(col, IFACE_("WARNING: Driver expression may not work correctly"), ICON_HELP); + uiItemL(col, TIP_("WARNING: Driver expression may not work correctly"), ICON_HELP); if (bpy_data_expr_error) { - uiItemL( - col, IFACE_("TIP: Use variables instead of bpy.data paths (see below)"), ICON_ERROR); + uiItemL(col, TIP_("TIP: Use variables instead of bpy.data paths (see below)"), ICON_ERROR); } if (bpy_ctx_expr_error) { - uiItemL(col, IFACE_("TIP: bpy.context is not safe for renderfarm usage"), ICON_ERROR); + uiItemL(col, TIP_("TIP: bpy.context is not safe for renderfarm usage"), ICON_ERROR); } } } @@ -984,7 +983,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, block = uiLayoutGetBlock(col); if (driver->flag & DRIVER_FLAG_INVALID) { - uiItemL(col, IFACE_("ERROR: Invalid target channel(s)"), ICON_ERROR); + uiItemL(col, TIP_("ERROR: Invalid target channel(s)"), ICON_ERROR); } /* Warnings about a lack of variables @@ -994,11 +993,11 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, * property animation */ if (BLI_listbase_is_empty(&driver->variables)) { - uiItemL(col, IFACE_("ERROR: Driver is useless without any inputs"), ICON_ERROR); + uiItemL(col, TIP_("ERROR: Driver is useless without any inputs"), ICON_ERROR); if (!BLI_listbase_is_empty(&fcu->modifiers)) { - uiItemL(col, IFACE_("TIP: Use F-Curves for procedural animation instead"), ICON_INFO); - uiItemL(col, IFACE_("F-Modifiers can generate curves for those too"), ICON_INFO); + uiItemL(col, TIP_("TIP: Use F-Curves for procedural animation instead"), ICON_INFO); + uiItemL(col, TIP_("F-Modifiers can generate curves for those too"), ICON_INFO); } } } @@ -1118,7 +1117,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, 0.0, 0.0, 0.0, - IFACE_("Invalid variable name, click here for details")); + TIP_("Invalid variable name, click here for details")); UI_but_func_set(but, driver_dvar_invalid_name_query_cb, dvar, NULL); // XXX: reports? } @@ -1136,7 +1135,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, 0.0, 0.0, 0.0, - IFACE_("Delete target variable")); + TIP_("Delete target variable")); UI_but_func_set(but, driver_delete_var_cb, driver, dvar); UI_block_emboss_set(block, UI_EMBOSS); diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 17710734c80..fb4369f5113 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -1209,36 +1209,36 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i uiLayoutSetAlignment(col, UI_LAYOUT_ALIGN_RIGHT); if (ibuf == NULL) { - uiItemL(col, IFACE_("Can't Load Image"), ICON_NONE); + uiItemL(col, TIP_("Can't Load Image"), ICON_NONE); } else { char str[MAX_IMAGE_INFO_LEN] = {0}; const int len = MAX_IMAGE_INFO_LEN; int ofs = 0; - ofs += BLI_snprintf(str + ofs, len - ofs, IFACE_("%d x %d, "), ibuf->x, ibuf->y); + ofs += BLI_snprintf(str + ofs, len - ofs, TIP_("%d x %d, "), ibuf->x, ibuf->y); if (ibuf->rect_float) { if (ibuf->channels != 4) { - ofs += BLI_snprintf(str + ofs, len - ofs, IFACE_("%d float channel(s)"), ibuf->channels); + ofs += BLI_snprintf(str + ofs, len - ofs, TIP_("%d float channel(s)"), ibuf->channels); } else if (ibuf->planes == R_IMF_PLANES_RGBA) { - ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" RGBA float"), len - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGBA float"), len - ofs); } else { - ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" RGB float"), len - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGB float"), len - ofs); } } else { if (ibuf->planes == R_IMF_PLANES_RGBA) { - ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" RGBA byte"), len - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGBA byte"), len - ofs); } else { - ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" RGB byte"), len - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGB byte"), len - ofs); } } if (ibuf->zbuf || ibuf->zbuf_float) { - ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" + Z"), len - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_(" + Z"), len - ofs); } uiItemL(col, str, ICON_NONE); @@ -1261,17 +1261,17 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i if (duration > 0) { /* Movie duration */ - BLI_snprintf(str, MAX_IMAGE_INFO_LEN, IFACE_("Frame %d / %d"), framenr, duration); + BLI_snprintf(str, MAX_IMAGE_INFO_LEN, TIP_("Frame %d / %d"), framenr, duration); } else if (ima->source == IMA_SRC_SEQUENCE && ibuf) { /* Image sequence frame number + filename */ const char *filename = BLI_last_slash(ibuf->name); filename = (filename == NULL) ? ibuf->name : filename + 1; - BLI_snprintf(str, MAX_IMAGE_INFO_LEN, IFACE_("Frame %d: %s"), framenr, filename); + BLI_snprintf(str, MAX_IMAGE_INFO_LEN, TIP_("Frame %d: %s"), framenr, filename); } else { /* Frame number */ - BLI_snprintf(str, MAX_IMAGE_INFO_LEN, IFACE_("Frame %d"), framenr); + BLI_snprintf(str, MAX_IMAGE_INFO_LEN, TIP_("Frame %d"), framenr); } uiItemL(col, str, ICON_NONE); diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 604792e3254..1c9a7d3584c 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -442,11 +442,11 @@ static void stats_string(ViewLayer *view_layer) /* get memory statistics */ BLI_str_format_byte_unit(formatted_mem, mem_in_use - mmap_in_use, true); - ofs = BLI_snprintf(memstr, MAX_INFO_MEM_LEN, IFACE_(" | Mem: %s"), formatted_mem); + ofs = BLI_snprintf(memstr, MAX_INFO_MEM_LEN, TIP_(" | Mem: %s"), formatted_mem); if (mmap_in_use) { BLI_str_format_byte_unit(formatted_mem, mmap_in_use, true); - BLI_snprintf(memstr + ofs, MAX_INFO_MEM_LEN - ofs, IFACE_(" (%s)"), formatted_mem); + BLI_snprintf(memstr + ofs, MAX_INFO_MEM_LEN - ofs, TIP_(" (%s)"), formatted_mem); } if (GPU_mem_stats_supported()) { @@ -455,11 +455,11 @@ static void stats_string(ViewLayer *view_layer) GPU_mem_stats_get(&gpu_tot_memory, &gpu_free_mem); BLI_str_format_byte_unit(formatted_mem, gpu_free_mem, true); - ofs = BLI_snprintf(gpumemstr, MAX_INFO_MEM_LEN, IFACE_(" | Free GPU Mem: %s"), formatted_mem); + ofs = BLI_snprintf(gpumemstr, MAX_INFO_MEM_LEN, TIP_(" | Free GPU Mem: %s"), formatted_mem); if (gpu_tot_memory) { BLI_str_format_byte_unit(formatted_mem, gpu_tot_memory, true); - BLI_snprintf(gpumemstr + ofs, MAX_INFO_MEM_LEN - ofs, IFACE_("/%s"), formatted_mem); + BLI_snprintf(gpumemstr + ofs, MAX_INFO_MEM_LEN - ofs, TIP_("/%s"), formatted_mem); } } @@ -479,13 +479,13 @@ static void stats_string(ViewLayer *view_layer) if (obedit) { if (BKE_keyblock_from_object(obedit)) { - ofs += BLI_strncpy_rlen(s + ofs, IFACE_("(Key) "), MAX_INFO_LEN - ofs); + ofs += BLI_strncpy_rlen(s + ofs, TIP_("(Key) "), MAX_INFO_LEN - ofs); } if (obedit->type == OB_MESH) { ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, - IFACE_("Verts:%s/%s | Edges:%s/%s | Faces:%s/%s | Tris:%s"), + TIP_("Verts:%s/%s | Edges:%s/%s | Faces:%s/%s | Tris:%s"), stats_fmt.totvertsel, stats_fmt.totvert, stats_fmt.totedgesel, @@ -497,7 +497,7 @@ static void stats_string(ViewLayer *view_layer) else if (obedit->type == OB_ARMATURE) { ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, - IFACE_("Verts:%s/%s | Bones:%s/%s"), + TIP_("Verts:%s/%s | Bones:%s/%s"), stats_fmt.totvertsel, stats_fmt.totvert, stats_fmt.totbonesel, @@ -506,7 +506,7 @@ static void stats_string(ViewLayer *view_layer) else { ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, - IFACE_("Verts:%s/%s"), + TIP_("Verts:%s/%s"), stats_fmt.totvertsel, stats_fmt.totvert); } @@ -517,7 +517,7 @@ static void stats_string(ViewLayer *view_layer) else if (ob && (object_mode & OB_MODE_POSE)) { ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, - IFACE_("Bones:%s/%s %s%s"), + TIP_("Bones:%s/%s %s%s"), stats_fmt.totbonesel, stats_fmt.totbone, memstr, @@ -526,7 +526,7 @@ static void stats_string(ViewLayer *view_layer) else if ((ob) && (ob->type == OB_GPENCIL)) { ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, - IFACE_("Layers:%s | Frames:%s | Strokes:%s | Points:%s | Objects:%s/%s"), + TIP_("Layers:%s | Frames:%s | Strokes:%s | Points:%s | Objects:%s/%s"), stats_fmt.totgplayer, stats_fmt.totgpframe, stats_fmt.totgpstroke, @@ -540,7 +540,7 @@ static void stats_string(ViewLayer *view_layer) else if (stats_is_object_dynamic_topology_sculpt(ob, object_mode)) { ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, - IFACE_("Verts:%s | Tris:%s%s"), + TIP_("Verts:%s | Tris:%s%s"), stats_fmt.totvert, stats_fmt.tottri, gpumemstr); @@ -548,7 +548,7 @@ static void stats_string(ViewLayer *view_layer) else { ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, - IFACE_("Verts:%s | Faces:%s | Tris:%s | Objects:%s/%s%s%s"), + TIP_("Verts:%s | Faces:%s | Tris:%s | Objects:%s/%s%s%s"), stats_fmt.totvert, stats_fmt.totface, stats_fmt.tottri, diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index acb3d913114..052f653ca7f 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -857,6 +857,7 @@ void NLA_OT_transition_add(wmOperatorType *ot) static int nlaedit_add_sound_exec(bContext *C, wmOperator *UNUSED(op)) { + Main *bmain = CTX_data_main(C); bAnimContext ac; ListBase anim_data = {NULL, NULL}; @@ -894,7 +895,7 @@ static int nlaedit_add_sound_exec(bContext *C, wmOperator *UNUSED(op)) } /* create a new strip, and offset it to start on the current frame */ - strip = BKE_nla_add_soundstrip(ac.scene, ob->data); + strip = BKE_nla_add_soundstrip(bmain, ac.scene, ob->data); strip->start += cfra; strip->end += cfra; diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index d34ba14700a..cf52ca8489f 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -562,7 +562,7 @@ static void node_link_update_header(bContext *C, bNodeLinkDrag *UNUSED(nldrag)) { char header[UI_MAX_DRAW_STR]; - BLI_strncpy(header, IFACE_("LMB: drag node link, RMB: cancel"), sizeof(header)); + BLI_strncpy(header, TIP_("LMB: drag node link, RMB: cancel"), sizeof(header)); ED_workspace_status_text(C, header); } diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c index 49ba397a108..d8276aa2bbc 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.c +++ b/source/blender/editors/space_outliner/outliner_dragdrop.c @@ -802,7 +802,7 @@ static bool collection_drop_poll(bContext *C, if (!data.from || event->ctrl) { tselem->flag |= TSE_DRAG_INTO; changed = true; - *tooltip = IFACE_("Link inside Collection"); + *tooltip = TIP_("Link inside Collection"); } else { switch (data.insert_type) { diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index d994152ba67..feff1dc5f4a 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -2574,7 +2574,7 @@ static void outliner_draw_iconrow_doit(uiBlock *block, /** * Return the index to use based on the TreeElement ID and object type * - * We use a continuum of indices until we get to the object datablocks + * We use a continuum of indices until we get to the object data-blocks * and we then make room for the object types. */ static int tree_element_id_type_to_index(TreeElement *te) @@ -3197,7 +3197,7 @@ static void outliner_draw_highlights_recursive(unsigned pos, else { if (is_searching && (tselem->flag & TSE_SEARCHMATCH)) { /* search match highlights - * we don't expand items when searching in the datablocks but we + * we don't expand items when searching in the data-blocks but we * still want to highlight any filter matches. */ immUniformColor4fv(col_searchmatch); immRecti(pos, start_x, start_y, end_x, start_y + UI_UNIT_Y); diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index ab9e29a9105..fa28d119244 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -179,7 +179,7 @@ typedef enum { * - Flag options defined in DNA_outliner_types.h * - SO_SEARCH_RECURSIVE defined in DNA_space_types.h * - * - NOT in datablocks view - searching all datablocks takes way too long + * - NOT in data-blocks view - searching all data-blocks takes way too long * to be useful * - not searching into RNA items helps but isn't the complete solution */ diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 4e07be7d915..2a0bc470bcb 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -109,7 +109,7 @@ static void outliner_storage_cleanup(SpaceOutliner *soops) } /* cleanup only after reading file or undo step, and always for - * RNA datablocks view in order to save memory */ + * RNA data-blocks view in order to save memory */ if (soops->storeflag & SO_TREESTORE_CLEANUP) { soops->storeflag &= ~SO_TREESTORE_CLEANUP; @@ -835,7 +835,7 @@ static TreeElement *outliner_add_element( if (type == 0) { TreeStoreElem *tsepar = parent ? TREESTORE(parent) : NULL; - /* ID datablock */ + /* ID data-block. */ if (tsepar == NULL || tsepar->type != TSE_ID_BASE || soops->filter_id_type) { outliner_add_id_contents(soops, te, tselem, id); } @@ -1277,7 +1277,7 @@ static TreeElement *outliner_add_library_contents(Main *mainvar, if (id) { if (!tenlib) { - /* Create library tree element on demand, depending if there are any datablocks. */ + /* Create library tree element on demand, depending if there are any data-blocks. */ if (lib) { tenlib = outliner_add_element(soops, lb, lib, NULL, 0, 0); } @@ -1287,7 +1287,7 @@ static TreeElement *outliner_add_library_contents(Main *mainvar, } } - /* Create datablock list parent element on demand. */ + /* Create data-block list parent element on demand. */ if (filter_id_type) { ten = tenlib; } @@ -1328,7 +1328,7 @@ static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOutliner *soops if (lbarray[a] && lbarray[a]->first) { ID *id = lbarray[a]->first; - /* check if there are any datablocks of this type which are orphans */ + /* check if there are any data-blocks of this type which are orphans */ for (; id; id = id->next) { if (ID_REAL_USERS(id) <= 0) { break; @@ -1336,7 +1336,7 @@ static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOutliner *soops } if (id) { - /* header for this type of datablock */ + /* header for this type of data-block */ if (filter_id_type) { ten = NULL; } @@ -1346,7 +1346,7 @@ static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOutliner *soops ten->name = outliner_idcode_to_plural(GS(id->name)); } - /* add the orphaned datablocks - these will not be added with any subtrees attached */ + /* add the orphaned data-blocks - these will not be added with any subtrees attached */ for (id = lbarray[a]->first; id; id = id->next) { if (ID_REAL_USERS(id) <= 0) { outliner_add_element(soops, (ten) ? &ten->subtree : &soops->tree, id, ten, 0, 0); @@ -2218,7 +2218,7 @@ void outliner_build_tree( int show_opened = !soops->treestore || !BLI_mempool_len(soops->treestore); /* Are we looking for something - we want to tag parents to filter child matches - * - NOT in datablocks view - searching all datablocks takes way too long to be useful + * - NOT in data-blocks view - searching all data-blocks takes way too long to be useful * - this variable is only set once per tree build */ if (soops->search_string[0] != 0 && soops->outlinevis != SO_DATA_API) { soops->search_flags |= SO_SEARCH_RECURSIVE; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 1b07a070505..5510b981899 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -726,7 +726,8 @@ static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short de } } -static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, ListBase *new_seq_list, int cutframe) +static Sequence *cut_seq_hard( + Main *bmain, Scene *scene, Sequence *seq, ListBase *new_seq_list, int cutframe) { TransSeq ts; Sequence *seqn = NULL; @@ -755,7 +756,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, ListBase *new_seq_lis * blend file, or our code may have minor differences reading file length between versions. * This causes hard-cut to fail, see: T47862 */ if (seq->type != SEQ_TYPE_META) { - BKE_sequence_reload_new_file(scene, seq, true); + BKE_sequence_reload_new_file(bmain, scene, seq, true); BKE_sequence_calc(scene, seq); } @@ -790,7 +791,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, ListBase *new_seq_lis } } - BKE_sequence_reload_new_file(scene, seq, false); + BKE_sequence_reload_new_file(bmain, scene, seq, false); BKE_sequence_calc(scene, seq); if (!skip_dup) { @@ -837,13 +838,14 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, ListBase *new_seq_lis seqn->startstill = 0; } - BKE_sequence_reload_new_file(scene, seqn, false); + BKE_sequence_reload_new_file(bmain, scene, seqn, false); BKE_sequence_calc(scene, seqn); } return seqn; } -static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, ListBase *new_seq_list, int cutframe) +static Sequence *cut_seq_soft( + Main *UNUSED(bmain), Scene *scene, Sequence *seq, ListBase *new_seq_list, int cutframe) { TransSeq ts; Sequence *seqn = NULL; @@ -949,10 +951,11 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, ListBase *new_seq_lis * may generate strips with the same name (which will mess up animdata) */ -static bool cut_seq_list(Scene *scene, +static bool cut_seq_list(Main *bmain, + Scene *scene, ListBase *slist, int cutframe, - Sequence *(*cut_seq)(Scene *, Sequence *, ListBase *, int)) + Sequence *(*cut_seq)(Main *bmain, Scene *, Sequence *, ListBase *, int)) { Sequence *seq, *seq_next_iter; Sequence *seq_first_new = NULL; @@ -964,7 +967,7 @@ static bool cut_seq_list(Scene *scene, seq->tmp = NULL; if (seq->flag & SELECT) { if (cutframe > seq->startdisp && cutframe < seq->enddisp) { - Sequence *seqn = cut_seq(scene, seq, slist, cutframe); + Sequence *seqn = cut_seq(bmain, scene, seq, slist, cutframe); if (seqn) { if (seq_first_new == NULL) { seq_first_new = seqn; @@ -1040,7 +1043,7 @@ static void set_filter_seq(Scene *scene) if (seq->flag & SELECT) { if (seq->type == SEQ_TYPE_MOVIE) { seq->flag |= SEQ_FILTERY; - BKE_sequence_reload_new_file(scene, seq, false); + BKE_sequence_reload_new_file(bmain, scene, seq, false); BKE_sequence_calc(scene, seq); } } @@ -1610,10 +1613,10 @@ static void sequencer_slip_update_header(Scene *scene, ScrArea *sa, SlipData *da if (hasNumInput(&data->num_input)) { char num_str[NUM_STR_REP_LEN]; outputNumInput(&data->num_input, num_str, &scene->unit); - BLI_snprintf(msg, sizeof(msg), IFACE_("Trim offset: %s"), num_str); + BLI_snprintf(msg, sizeof(msg), TIP_("Trim offset: %s"), num_str); } else { - BLI_snprintf(msg, sizeof(msg), IFACE_("Trim offset: %d"), offset); + BLI_snprintf(msg, sizeof(msg), TIP_("Trim offset: %d"), offset); } } @@ -1622,6 +1625,7 @@ static void sequencer_slip_update_header(Scene *scene, ScrArea *sa, SlipData *da static int sequencer_slip_modal(bContext *C, wmOperator *op, const wmEvent *event) { + Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); SlipData *data = (SlipData *)op->customdata; ScrArea *sa = CTX_wm_area(C); @@ -1702,7 +1706,7 @@ static int sequencer_slip_modal(bContext *C, wmOperator *op, const wmEvent *even for (i = 0; i < data->num_seq; i++) { Sequence *seq = data->seq_array[i]; - BKE_sequence_reload_new_file(scene, seq, false); + BKE_sequence_reload_new_file(bmain, scene, seq, false); BKE_sequence_calc(scene, seq); } @@ -1956,6 +1960,7 @@ void SEQUENCER_OT_unlock(struct wmOperatorType *ot) /* reload operator */ static int sequencer_reload_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); Editing *ed = BKE_sequencer_editing_get(scene, false); Sequence *seq; @@ -1964,7 +1969,7 @@ static int sequencer_reload_exec(bContext *C, wmOperator *op) for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { BKE_sequencer_update_changed_seq_and_deps(scene, seq, 0, 1); - BKE_sequence_reload_new_file(scene, seq, !adjust_length); + BKE_sequence_reload_new_file(bmain, scene, seq, !adjust_length); if (adjust_length) { if (BKE_sequence_test_overlap(ed->seqbasep, seq)) { @@ -2139,6 +2144,7 @@ static const EnumPropertyItem prop_cut_types[] = { static int sequencer_cut_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); Editing *ed = BKE_sequencer_editing_get(scene, false); int cut_side, cut_hard, cut_frame; @@ -2150,10 +2156,10 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op) cut_side = RNA_enum_get(op->ptr, "side"); if (cut_hard == SEQ_CUT_HARD) { - changed = cut_seq_list(scene, ed->seqbasep, cut_frame, cut_seq_hard); + changed = cut_seq_list(bmain, scene, ed->seqbasep, cut_frame, cut_seq_hard); } else { - changed = cut_seq_list(scene, ed->seqbasep, cut_frame, cut_seq_soft); + changed = cut_seq_list(bmain, scene, ed->seqbasep, cut_frame, cut_seq_soft); } if (changed) { /* got new strips ? */ @@ -2695,7 +2701,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op) DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seqm); - BKE_sequence_invalidate_cache_composite(scene, seq); + BKE_sequence_invalidate_cache_composite(scene, seqm); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -3384,7 +3390,7 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op) } /* Replace datablock pointers with copies, to keep things working in case - * datablocks get deleted or another .blend file is opened. */ + * data-blocks get deleted or another .blend file is opened. */ BKE_sequencer_base_clipboard_pointers_store(bmain, &seqbase_clipboard); return OPERATOR_FINISHED; @@ -3418,9 +3424,9 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op)) ED_sequencer_deselect_all(scene); ofs = scene->r.cfra - seqbase_clipboard_frame; - /* Copy strips, temporarily restoring pointers to actual datablocks. This + /* Copy strips, temporarily restoring pointers to actual data-blocks. This * must happen on the clipboard itself, so that copying does user counting - * on the actual datablocks. */ + * on the actual data-blocks. */ BKE_sequencer_base_clipboard_pointers_restore(&seqbase_clipboard, bmain); BKE_sequence_base_dupli_recursive( scene, scene, &nseqbase, &seqbase_clipboard, SEQ_DUPE_UNIQUE_NAME, 0); @@ -3948,7 +3954,7 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op) /* correct start/end frames so we don't move * important not to set seq->len = len; allow the function to handle it */ - BKE_sequence_reload_new_file(scene, seq, true); + BKE_sequence_reload_new_file(bmain, scene, seq, true); BKE_sequence_calc(scene, seq); diff --git a/source/blender/editors/space_sequencer/sequencer_preview.c b/source/blender/editors/space_sequencer/sequencer_preview.c index 8a4e8c007f7..81ddd0dd8cc 100644 --- a/source/blender/editors/space_sequencer/sequencer_preview.c +++ b/source/blender/editors/space_sequencer/sequencer_preview.c @@ -80,9 +80,7 @@ static void preview_startjob(void *data, short *stop, short *do_update, float *p PreviewJobAudio *preview_next; bSound *sound = previewjb->sound; - BKE_sound_load_audio(previewjb->bmain, sound); - BKE_sound_read_waveform(sound, stop); - BKE_sound_free_audio(sound); + BKE_sound_read_waveform(previewjb->bmain, sound, stop); if (*stop || G.is_break) { BLI_mutex_lock(pj->mutex); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index af4b53ee858..57f86059d9d 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -362,7 +362,9 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e else if (left_right != SEQ_SELECT_LR_NONE) { /* use different logic for this */ float x; - ED_sequencer_deselect_all(scene); + if (extend == false) { + ED_sequencer_deselect_all(scene); + } switch (left_right) { case SEQ_SELECT_LR_MOUSE: diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index fb121aa716b..51dc14f3dff 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -428,9 +428,13 @@ static int snap_selected_to_location(bContext *C, sub_v3_v3(cursor_parent, ob->obmat[3]); if (ob->parent) { - float originmat[3][3]; - BKE_object_where_is_calc_ex(depsgraph, scene, NULL, ob, originmat); + float originmat[3][3], parentmat[4][4]; + /* Use the evaluated object here because sometimes + * `ob->parent->runtime.curve_cache` is required. */ + Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); + BKE_object_get_parent_matrix(ob_eval, ob_eval->parent, parentmat); + mul_m3_m4m4(originmat, parentmat, ob->parentinv); invert_m3_m3(imat, originmat); mul_m3_v3(imat, cursor_parent); } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 1170e2ea5a8..9019b21997f 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -971,23 +971,23 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm /* Initialize */ switch (key_type) { case XKEY: - msg1 = IFACE_("along X"); - msg2 = IFACE_("along %s X"); - msg3 = IFACE_("locking %s X"); + msg1 = TIP_("along X"); + msg2 = TIP_("along %s X"); + msg3 = TIP_("locking %s X"); axis = 'X'; constraint_axis = CON_AXIS0; break; case YKEY: - msg1 = IFACE_("along Y"); - msg2 = IFACE_("along %s Y"); - msg3 = IFACE_("locking %s Y"); + msg1 = TIP_("along Y"); + msg2 = TIP_("along %s Y"); + msg3 = TIP_("locking %s Y"); axis = 'Y'; constraint_axis = CON_AXIS1; break; case ZKEY: - msg1 = IFACE_("along Z"); - msg2 = IFACE_("along %s Z"); - msg3 = IFACE_("locking %s Z"); + msg1 = TIP_("along Z"); + msg2 = TIP_("along %s Z"); + msg3 = TIP_("locking %s Z"); axis = 'Z'; constraint_axis = CON_AXIS2; break; @@ -1046,6 +1046,7 @@ int transformEvent(TransInfo *t, const wmEvent *event) char cmode = constraintModeToChar(t); bool handled = false; const int modifiers_prev = t->modifiers; + const int mode_prev = t->mode; t->redraw |= handleMouseInput(t, &t->mouse, event); @@ -1101,7 +1102,6 @@ int transformEvent(TransInfo *t, const wmEvent *event) initTranslation(t); initSnapping(t, NULL); // need to reinit after mode change t->redraw |= TREDRAW_HARD; - WM_event_add_mousemove(t->context); handled = true; } else if (t->mode == TFM_SEQ_SLIDE) { @@ -1136,7 +1136,6 @@ int transformEvent(TransInfo *t, const wmEvent *event) initSnapping(t, NULL); // need to reinit after mode change t->redraw |= TREDRAW_HARD; handled = true; - WM_event_add_mousemove(t->context); } } else if (t->options & (CTX_MOVIECLIP | CTX_MASK)) { @@ -1393,7 +1392,7 @@ int transformEvent(TransInfo *t, const wmEvent *event) /* exception for switching to dolly, or trackball, in camera view */ if (t->flag & T_CAMERA) { if (t->mode == TFM_TRANSLATION) { - setLocalConstraint(t, (CON_AXIS2), IFACE_("along local Z")); + setLocalConstraint(t, (CON_AXIS2), TIP_("along local Z")); } else if (t->mode == TFM_ROTATION) { restoreTransObjects(t); @@ -1603,8 +1602,8 @@ int transformEvent(TransInfo *t, const wmEvent *event) } /* if we change snap options, get the unsnapped values back */ - if ((t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) != - (modifiers_prev & (MOD_SNAP | MOD_SNAP_INVERT))) { + if ((mode_prev != t->mode) || ((t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) != + (modifiers_prev & (MOD_SNAP | MOD_SNAP_INVERT)))) { applyMouseInput(t, &t->mouse, t->mval, t->values); } @@ -3384,7 +3383,7 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2])) BLI_snprintf(str, sizeof(str), - IFACE_("Bend Angle: %s Radius: %s Alt, Clamp %s"), + TIP_("Bend Angle: %s Radius: %s Alt, Clamp %s"), &c[0], &c[NUM_STR_REP_LEN], WM_bool_as_string(is_clamp)); @@ -3393,7 +3392,7 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2])) /* default header print */ BLI_snprintf(str, sizeof(str), - IFACE_("Bend Angle: %.3f Radius: %.4f, Alt, Clamp %s"), + TIP_("Bend Angle: %.3f Radius: %.4f, Alt, Clamp %s"), RAD2DEGF(values.angle), values.scale * data->warp_init_dist, WM_bool_as_string(is_clamp)); @@ -3623,13 +3622,13 @@ static void applyShear(TransInfo *t, const int UNUSED(mval[2])) outputNumInput(&(t->num), c, &t->scene->unit); - BLI_snprintf(str, sizeof(str), IFACE_("Shear: %s %s"), c, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Shear: %s %s"), c, t->proptext); } else { /* default header print */ BLI_snprintf(str, sizeof(str), - IFACE_("Shear: %.3f %s (Press X or Y to set shear axis)"), + TIP_("Shear: %.3f %s (Press X or Y to set shear axis)"), value, t->proptext); } @@ -3769,7 +3768,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_ case 0: ofs += BLI_snprintf(str + ofs, UI_MAX_DRAW_STR - ofs, - IFACE_("Scale: %s%s %s"), + TIP_("Scale: %s%s %s"), &tvec[0], t->con.text, t->proptext); @@ -3777,7 +3776,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_ case 1: ofs += BLI_snprintf(str + ofs, UI_MAX_DRAW_STR - ofs, - IFACE_("Scale: %s : %s%s %s"), + TIP_("Scale: %s : %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN], t->con.text, @@ -3786,7 +3785,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_ case 2: ofs += BLI_snprintf(str + ofs, UI_MAX_DRAW_STR - ofs, - IFACE_("Scale: %s : %s : %s%s %s"), + TIP_("Scale: %s : %s : %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2], @@ -3799,7 +3798,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_ if (t->flag & T_2D_EDIT) { ofs += BLI_snprintf(str + ofs, UI_MAX_DRAW_STR - ofs, - IFACE_("Scale X: %s Y: %s%s %s"), + TIP_("Scale X: %s Y: %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN], t->con.text, @@ -3808,7 +3807,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_ else { ofs += BLI_snprintf(str + ofs, UI_MAX_DRAW_STR - ofs, - IFACE_("Scale X: %s Y: %s Z: %s%s %s"), + TIP_("Scale X: %s Y: %s Z: %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2], @@ -3819,7 +3818,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_ if (t->flag & T_PROP_EDIT_ALL) { ofs += BLI_snprintf( - str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_(" Proportional size: %.2f"), t->prop_size); + str + ofs, UI_MAX_DRAW_STR - ofs, TIP_(" Proportional size: %.2f"), t->prop_size); } } @@ -4227,11 +4226,11 @@ static void applyToSphere(TransInfo *t, const int UNUSED(mval[2])) outputNumInput(&(t->num), c, &t->scene->unit); - BLI_snprintf(str, sizeof(str), IFACE_("To Sphere: %s %s"), c, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("To Sphere: %s %s"), c, t->proptext); } else { /* default header print */ - BLI_snprintf(str, sizeof(str), IFACE_("To Sphere: %.4f %s"), ratio, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("To Sphere: %.4f %s"), ratio, t->proptext); } FOREACH_TRANS_DATA_CONTAINER (t, tc) { @@ -4313,17 +4312,13 @@ static void headerRotation(TransInfo *t, char str[UI_MAX_DRAW_STR], float final) outputNumInput(&(t->num), c, &t->scene->unit); - ofs += BLI_snprintf(str + ofs, - UI_MAX_DRAW_STR - ofs, - IFACE_("Rot: %s %s %s"), - &c[0], - t->con.text, - t->proptext); + ofs += BLI_snprintf( + str + ofs, UI_MAX_DRAW_STR - ofs, TIP_("Rot: %s %s %s"), &c[0], t->con.text, t->proptext); } else { ofs += BLI_snprintf(str + ofs, UI_MAX_DRAW_STR - ofs, - IFACE_("Rot: %.2f%s %s"), + TIP_("Rot: %.2f%s %s"), RAD2DEGF(final), t->con.text, t->proptext); @@ -4331,7 +4326,7 @@ static void headerRotation(TransInfo *t, char str[UI_MAX_DRAW_STR], float final) if (t->flag & T_PROP_EDIT_ALL) { ofs += BLI_snprintf( - str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_(" Proportional size: %.2f"), t->prop_size); + str + ofs, UI_MAX_DRAW_STR - ofs, TIP_(" Proportional size: %.2f"), t->prop_size); } } @@ -4744,7 +4739,7 @@ static void applyTrackball(TransInfo *t, const int UNUSED(mval[2])) ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, - IFACE_("Trackball: %s %s %s"), + TIP_("Trackball: %s %s %s"), &c[0], &c[NUM_STR_REP_LEN], t->proptext); @@ -4752,7 +4747,7 @@ static void applyTrackball(TransInfo *t, const int UNUSED(mval[2])) else { ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, - IFACE_("Trackball: %.2f %.2f %s"), + TIP_("Trackball: %.2f %.2f %s"), RAD2DEGF(phi[0]), RAD2DEGF(phi[1]), t->proptext); @@ -4760,7 +4755,7 @@ static void applyTrackball(TransInfo *t, const int UNUSED(mval[2])) if (t->flag & T_PROP_EDIT_ALL) { ofs += BLI_snprintf( - str + ofs, sizeof(str) - ofs, IFACE_(" Proportional size: %.2f"), t->prop_size); + str + ofs, sizeof(str) - ofs, TIP_(" Proportional size: %.2f"), t->prop_size); } #if 0 /* UNUSED */ @@ -5038,7 +5033,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ short chainlen = t->settings->autoik_chainlen; if (chainlen) { - BLI_snprintf(autoik, NUM_STR_REP_LEN, IFACE_("AutoIK-Len: %d"), chainlen); + BLI_snprintf(autoik, NUM_STR_REP_LEN, TIP_("AutoIK-Len: %d"), chainlen); } else { autoik[0] = '\0'; @@ -5112,7 +5107,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ if (t->flag & T_PROP_EDIT_ALL) { ofs += BLI_snprintf( - str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_(" Proportional size: %.2f"), t->prop_size); + str + ofs, UI_MAX_DRAW_STR - ofs, TIP_(" Proportional size: %.2f"), t->prop_size); } if (t->spacetype == SPACE_NODE) { @@ -5120,9 +5115,8 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ if ((snode->flag & SNODE_SKIP_INSOFFSET) == 0) { const char *str_old = BLI_strdup(str); - const char *str_dir = (snode->insert_ofs_dir == SNODE_INSERTOFS_DIR_RIGHT) ? - IFACE_("right") : - IFACE_("left"); + const char *str_dir = (snode->insert_ofs_dir == SNODE_INSERTOFS_DIR_RIGHT) ? TIP_("right") : + TIP_("left"); char str_km[64]; WM_modalkeymap_items_to_string( @@ -5130,7 +5124,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ ofs += BLI_snprintf(str, UI_MAX_DRAW_STR, - IFACE_("Auto-offset set to %s - press %s to toggle direction | %s"), + TIP_("Auto-offset set to %s - press %s to toggle direction | %s"), str_dir, str_km, str_old); @@ -5346,7 +5340,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) t->values[0] = -distance; /* header print for NumInput */ - ofs += BLI_strncpy_rlen(str + ofs, IFACE_("Shrink/Fatten:"), sizeof(str) - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_("Shrink/Fatten:"), sizeof(str) - ofs); if (hasNumInput(&t->num)) { char c[NUM_STR_REP_LEN]; outputNumInput(&(t->num), c, &t->scene->unit); @@ -5370,7 +5364,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) } BLI_snprintf(str + ofs, sizeof(str) - ofs, - IFACE_(" or Alt) Even Thickness %s"), + TIP_(" or Alt) Even Thickness %s"), WM_bool_as_string((t->flag & T_ALT_TRANSFORM) != 0)); /* done with header string */ @@ -5449,13 +5443,13 @@ static void applyTilt(TransInfo *t, const int UNUSED(mval[2])) outputNumInput(&(t->num), c, &t->scene->unit); - BLI_snprintf(str, sizeof(str), IFACE_("Tilt: %s° %s"), &c[0], t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Tilt: %s° %s"), &c[0], t->proptext); /* XXX For some reason, this seems needed for this op, else RNA prop is not updated... :/ */ t->values[0] = final; } else { - BLI_snprintf(str, sizeof(str), IFACE_("Tilt: %.2f° %s"), RAD2DEGF(final), t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Tilt: %.2f° %s"), RAD2DEGF(final), t->proptext); } FOREACH_TRANS_DATA_CONTAINER (t, tc) { @@ -5531,10 +5525,10 @@ static void applyCurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) char c[NUM_STR_REP_LEN]; outputNumInput(&(t->num), c, &t->scene->unit); - BLI_snprintf(str, sizeof(str), IFACE_("Shrink/Fatten: %s"), c); + BLI_snprintf(str, sizeof(str), TIP_("Shrink/Fatten: %s"), c); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Shrink/Fatten: %3f"), ratio); + BLI_snprintf(str, sizeof(str), TIP_("Shrink/Fatten: %3f"), ratio); } FOREACH_TRANS_DATA_CONTAINER (t, tc) { @@ -5616,10 +5610,10 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) char c[NUM_STR_REP_LEN]; outputNumInput(&(t->num), c, &t->scene->unit); - BLI_snprintf(str, sizeof(str), IFACE_("Feather Shrink/Fatten: %s"), c); + BLI_snprintf(str, sizeof(str), TIP_("Feather Shrink/Fatten: %s"), c); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Feather Shrink/Fatten: %3f"), ratio); + BLI_snprintf(str, sizeof(str), TIP_("Feather Shrink/Fatten: %3f"), ratio); } /* detect if no points have feather yet */ @@ -5729,10 +5723,10 @@ static void applyGPShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) char c[NUM_STR_REP_LEN]; outputNumInput(&(t->num), c, &t->scene->unit); - BLI_snprintf(str, sizeof(str), IFACE_("Shrink/Fatten: %s"), c); + BLI_snprintf(str, sizeof(str), TIP_("Shrink/Fatten: %s"), c); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Shrink/Fatten: %3f"), ratio); + BLI_snprintf(str, sizeof(str), TIP_("Shrink/Fatten: %3f"), ratio); } FOREACH_TRANS_DATA_CONTAINER (t, tc) { @@ -5811,10 +5805,10 @@ static void applyGPOpacity(TransInfo *t, const int UNUSED(mval[2])) char c[NUM_STR_REP_LEN]; outputNumInput(&(t->num), c, &t->scene->unit); - BLI_snprintf(str, sizeof(str), IFACE_("Opacity: %s"), c); + BLI_snprintf(str, sizeof(str), TIP_("Opacity: %s"), c); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Opacity: %3f"), ratio); + BLI_snprintf(str, sizeof(str), TIP_("Opacity: %3f"), ratio); } FOREACH_TRANS_DATA_CONTAINER (t, tc) { @@ -5886,12 +5880,12 @@ static void applyPushPull(TransInfo *t, const int UNUSED(mval[2])) outputNumInput(&(t->num), c, &t->scene->unit); - BLI_snprintf(str, sizeof(str), IFACE_("Push/Pull: %s%s %s"), c, t->con.text, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Push/Pull: %s%s %s"), c, t->con.text, t->proptext); } else { /* default header print */ BLI_snprintf( - str, sizeof(str), IFACE_("Push/Pull: %.4f%s %s"), distance, t->con.text, t->proptext); + str, sizeof(str), TIP_("Push/Pull: %.4f%s %s"), distance, t->con.text, t->proptext); } if (t->con.applyRot && t->con.mode & CON_APPLY) { @@ -5986,19 +5980,19 @@ static void applyBevelWeight(TransInfo *t, const int UNUSED(mval[2])) outputNumInput(&(t->num), c, &t->scene->unit); if (weight >= 0.0f) { - BLI_snprintf(str, sizeof(str), IFACE_("Bevel Weight: +%s %s"), c, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Bevel Weight: +%s %s"), c, t->proptext); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Bevel Weight: %s %s"), c, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Bevel Weight: %s %s"), c, t->proptext); } } else { /* default header print */ if (weight >= 0.0f) { - BLI_snprintf(str, sizeof(str), IFACE_("Bevel Weight: +%.3f %s"), weight, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Bevel Weight: +%.3f %s"), weight, t->proptext); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Bevel Weight: %.3f %s"), weight, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Bevel Weight: %.3f %s"), weight, t->proptext); } } @@ -6076,19 +6070,19 @@ static void applyCrease(TransInfo *t, const int UNUSED(mval[2])) outputNumInput(&(t->num), c, &t->scene->unit); if (crease >= 0.0f) { - BLI_snprintf(str, sizeof(str), IFACE_("Crease: +%s %s"), c, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Crease: +%s %s"), c, t->proptext); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Crease: %s %s"), c, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Crease: %s %s"), c, t->proptext); } } else { /* default header print */ if (crease >= 0.0f) { - BLI_snprintf(str, sizeof(str), IFACE_("Crease: +%.3f %s"), crease, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Crease: +%.3f %s"), crease, t->proptext); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Crease: %.3f %s"), crease, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Crease: %.3f %s"), crease, t->proptext); } } @@ -6167,12 +6161,12 @@ static void headerBoneSize(TransInfo *t, const float vec[3], char str[UI_MAX_DRA if (t->con.mode & CON_APPLY) { if (t->num.idx_max == 0) { BLI_snprintf( - str, UI_MAX_DRAW_STR, IFACE_("ScaleB: %s%s %s"), &tvec[0], t->con.text, t->proptext); + str, UI_MAX_DRAW_STR, TIP_("ScaleB: %s%s %s"), &tvec[0], t->con.text, t->proptext); } else { BLI_snprintf(str, UI_MAX_DRAW_STR, - IFACE_("ScaleB: %s : %s : %s%s %s"), + TIP_("ScaleB: %s : %s : %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2], @@ -6183,7 +6177,7 @@ static void headerBoneSize(TransInfo *t, const float vec[3], char str[UI_MAX_DRA else { BLI_snprintf(str, UI_MAX_DRAW_STR, - IFACE_("ScaleB X: %s Y: %s Z: %s%s %s"), + TIP_("ScaleB X: %s Y: %s Z: %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2], @@ -6305,10 +6299,10 @@ static void applyBoneEnvelope(TransInfo *t, const int UNUSED(mval[2])) char c[NUM_STR_REP_LEN]; outputNumInput(&(t->num), c, &t->scene->unit); - BLI_snprintf(str, sizeof(str), IFACE_("Envelope: %s"), c); + BLI_snprintf(str, sizeof(str), TIP_("Envelope: %s"), c); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Envelope: %3f"), ratio); + BLI_snprintf(str, sizeof(str), TIP_("Envelope: %3f"), ratio); } FOREACH_TRANS_DATA_CONTAINER (t, tc) { @@ -8075,7 +8069,7 @@ static void applyEdgeSlide(TransInfo *t, const int UNUSED(mval[2])) t->values[0] = final; /* header string */ - ofs += BLI_strncpy_rlen(str + ofs, IFACE_("Edge Slide: "), sizeof(str) - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_("Edge Slide: "), sizeof(str) - ofs); if (hasNumInput(&t->num)) { char c[NUM_STR_REP_LEN]; outputNumInput(&(t->num), c, &t->scene->unit); @@ -8085,13 +8079,13 @@ static void applyEdgeSlide(TransInfo *t, const int UNUSED(mval[2])) ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, "%.4f ", final); } ofs += BLI_snprintf( - str + ofs, sizeof(str) - ofs, IFACE_("(E)ven: %s, "), WM_bool_as_string(use_even)); + str + ofs, sizeof(str) - ofs, TIP_("(E)ven: %s, "), WM_bool_as_string(use_even)); if (use_even) { ofs += BLI_snprintf( - str + ofs, sizeof(str) - ofs, IFACE_("(F)lipped: %s, "), WM_bool_as_string(flipped)); + str + ofs, sizeof(str) - ofs, TIP_("(F)lipped: %s, "), WM_bool_as_string(flipped)); } ofs += BLI_snprintf( - str + ofs, sizeof(str) - ofs, IFACE_("Alt or (C)lamp: %s"), WM_bool_as_string(is_clamp)); + str + ofs, sizeof(str) - ofs, TIP_("Alt or (C)lamp: %s"), WM_bool_as_string(is_clamp)); /* done with header string */ /* do stuff here */ @@ -8686,7 +8680,7 @@ static void applyVertSlide(TransInfo *t, const int UNUSED(mval[2])) t->values[0] = final; /* header string */ - ofs += BLI_strncpy_rlen(str + ofs, IFACE_("Vert Slide: "), sizeof(str) - ofs); + ofs += BLI_strncpy_rlen(str + ofs, TIP_("Vert Slide: "), sizeof(str) - ofs); if (hasNumInput(&t->num)) { char c[NUM_STR_REP_LEN]; outputNumInput(&(t->num), c, &t->scene->unit); @@ -8696,13 +8690,13 @@ static void applyVertSlide(TransInfo *t, const int UNUSED(mval[2])) ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, "%.4f ", final); } ofs += BLI_snprintf( - str + ofs, sizeof(str) - ofs, IFACE_("(E)ven: %s, "), WM_bool_as_string(use_even)); + str + ofs, sizeof(str) - ofs, TIP_("(E)ven: %s, "), WM_bool_as_string(use_even)); if (use_even) { ofs += BLI_snprintf( - str + ofs, sizeof(str) - ofs, IFACE_("(F)lipped: %s, "), WM_bool_as_string(flipped)); + str + ofs, sizeof(str) - ofs, TIP_("(F)lipped: %s, "), WM_bool_as_string(flipped)); } ofs += BLI_snprintf( - str + ofs, sizeof(str) - ofs, IFACE_("Alt or (C)lamp: %s"), WM_bool_as_string(is_clamp)); + str + ofs, sizeof(str) - ofs, TIP_("Alt or (C)lamp: %s"), WM_bool_as_string(is_clamp)); /* done with header string */ /* do stuff here */ @@ -8761,10 +8755,10 @@ static void applyBoneRoll(TransInfo *t, const int UNUSED(mval[2])) outputNumInput(&(t->num), c, &t->scene->unit); - BLI_snprintf(str, sizeof(str), IFACE_("Roll: %s"), &c[0]); + BLI_snprintf(str, sizeof(str), TIP_("Roll: %s"), &c[0]); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Roll: %.2f"), RAD2DEGF(final)); + BLI_snprintf(str, sizeof(str), TIP_("Roll: %.2f"), RAD2DEGF(final)); } /* set roll values */ @@ -8844,19 +8838,19 @@ static void applyBakeTime(TransInfo *t, const int mval[2]) outputNumInput(&(t->num), c, &t->scene->unit); if (time >= 0.0f) { - BLI_snprintf(str, sizeof(str), IFACE_("Time: +%s %s"), c, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Time: +%s %s"), c, t->proptext); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Time: %s %s"), c, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Time: %s %s"), c, t->proptext); } } else { /* default header print */ if (time >= 0.0f) { - BLI_snprintf(str, sizeof(str), IFACE_("Time: +%.3f %s"), time, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Time: +%.3f %s"), time, t->proptext); } else { - BLI_snprintf(str, sizeof(str), IFACE_("Time: %.3f %s"), time, t->proptext); + BLI_snprintf(str, sizeof(str), TIP_("Time: %.3f %s"), time, t->proptext); } } @@ -8928,7 +8922,7 @@ static void applyMirror(TransInfo *t, const int UNUSED(mval[2])) t->con.applySize(t, NULL, NULL, mat); } - BLI_snprintf(str, sizeof(str), IFACE_("Mirror%s"), t->con.text); + BLI_snprintf(str, sizeof(str), TIP_("Mirror%s"), t->con.text); FOREACH_TRANS_DATA_CONTAINER (t, tc) { TransData *td = tc->data; @@ -8972,10 +8966,10 @@ static void applyMirror(TransInfo *t, const int UNUSED(mval[2])) recalcData(t); if (t->flag & T_2D_EDIT) { - ED_area_status_text(t->sa, IFACE_("Select a mirror axis (X, Y)")); + ED_area_status_text(t->sa, TIP_("Select a mirror axis (X, Y)")); } else { - ED_area_status_text(t->sa, IFACE_("Select a mirror axis (X, Y, Z)")); + ED_area_status_text(t->sa, TIP_("Select a mirror axis (X, Y, Z)")); } } } @@ -9038,7 +9032,7 @@ static void applyAlign(TransInfo *t, const int UNUSED(mval[2])) recalcData(t); - ED_area_status_text(t->sa, IFACE_("Align")); + ED_area_status_text(t->sa, TIP_("Align")); } /** \} */ @@ -9083,7 +9077,7 @@ static void headerSeqSlide(TransInfo *t, const float val[2], char str[UI_MAX_DRA } ofs += BLI_snprintf( - str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_("Sequence Slide: %s%s, ("), &tvec[0], t->con.text); + str + ofs, UI_MAX_DRAW_STR - ofs, TIP_("Sequence Slide: %s%s, ("), &tvec[0], t->con.text); if (t->keymap) { wmKeyMapItem *kmi = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_TRANSLATE); @@ -9093,7 +9087,7 @@ static void headerSeqSlide(TransInfo *t, const float val[2], char str[UI_MAX_DRA } ofs += BLI_snprintf(str + ofs, UI_MAX_DRAW_STR - ofs, - IFACE_(" or Alt) Expand to fit %s"), + TIP_(" or Alt) Expand to fit %s"), WM_bool_as_string((t->flag & T_ALT_TRANSFORM) != 0)); } @@ -9354,11 +9348,11 @@ static void headerTimeTranslate(TransInfo *t, char str[UI_MAX_DRAW_STR]) } } - ofs += BLI_snprintf(str, UI_MAX_DRAW_STR, IFACE_("DeltaX: %s"), &tvec[0]); + ofs += BLI_snprintf(str, UI_MAX_DRAW_STR, TIP_("DeltaX: %s"), &tvec[0]); if (t->flag & T_PROP_EDIT_ALL) { ofs += BLI_snprintf( - str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_(" Proportional size: %.2f"), t->prop_size); + str + ofs, UI_MAX_DRAW_STR - ofs, TIP_(" Proportional size: %.2f"), t->prop_size); } } @@ -9546,7 +9540,7 @@ static void headerTimeSlide(TransInfo *t, const float sval, char str[UI_MAX_DRAW BLI_snprintf(&tvec[0], NUM_STR_REP_LEN, "%.4f", val); } - BLI_snprintf(str, UI_MAX_DRAW_STR, IFACE_("TimeSlide: %s"), &tvec[0]); + BLI_snprintf(str, UI_MAX_DRAW_STR, TIP_("TimeSlide: %s"), &tvec[0]); } static void applyTimeSlideValue(TransInfo *t, float sval) @@ -9704,7 +9698,7 @@ static void headerTimeScale(TransInfo *t, char str[UI_MAX_DRAW_STR]) BLI_snprintf(&tvec[0], NUM_STR_REP_LEN, "%.4f", t->values[0]); } - BLI_snprintf(str, UI_MAX_DRAW_STR, IFACE_("ScaleX: %s"), &tvec[0]); + BLI_snprintf(str, UI_MAX_DRAW_STR, TIP_("ScaleX: %s"), &tvec[0]); } static void applyTimeScaleValue(TransInfo *t) diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index ee08eb20ea3..06851451461 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -691,17 +691,17 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte switch (orientation) { case V3D_ORIENT_GLOBAL: { float mtx[3][3]; - BLI_snprintf(text, sizeof(text), ftext, IFACE_("global")); + BLI_snprintf(text, sizeof(text), ftext, TIP_("global")); unit_m3(mtx); setConstraint(t, mtx, mode, text); break; } case V3D_ORIENT_LOCAL: - BLI_snprintf(text, sizeof(text), ftext, IFACE_("local")); + BLI_snprintf(text, sizeof(text), ftext, TIP_("local")); setLocalConstraint(t, mode, text); break; case V3D_ORIENT_NORMAL: - BLI_snprintf(text, sizeof(text), ftext, IFACE_("normal")); + BLI_snprintf(text, sizeof(text), ftext, TIP_("normal")); if (checkUseAxisMatrix(t)) { setAxisMatrixConstraint(t, mode, text); } @@ -710,19 +710,19 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte } break; case V3D_ORIENT_VIEW: - BLI_snprintf(text, sizeof(text), ftext, IFACE_("view")); + BLI_snprintf(text, sizeof(text), ftext, TIP_("view")); setConstraint(t, t->spacemtx, mode, text); break; case V3D_ORIENT_CURSOR: - BLI_snprintf(text, sizeof(text), ftext, IFACE_("cursor")); + BLI_snprintf(text, sizeof(text), ftext, TIP_("cursor")); setConstraint(t, t->spacemtx, mode, text); break; case V3D_ORIENT_GIMBAL: - BLI_snprintf(text, sizeof(text), ftext, IFACE_("gimbal")); + BLI_snprintf(text, sizeof(text), ftext, TIP_("gimbal")); setConstraint(t, t->spacemtx, mode, text); break; case V3D_ORIENT_CUSTOM_MATRIX: - BLI_snprintf(text, sizeof(text), ftext, IFACE_("custom matrix")); + BLI_snprintf(text, sizeof(text), ftext, TIP_("custom matrix")); setConstraint(t, t->spacemtx, mode, text); break; case V3D_ORIENT_CUSTOM: { @@ -730,7 +730,7 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte BLI_snprintf(orientation_str, sizeof(orientation_str), "%s \"%s\"", - IFACE_("custom orientation"), + TIP_("custom orientation"), t->orientation.custom->name); BLI_snprintf(text, sizeof(text), ftext, orientation_str); setConstraint(t, t->spacemtx, mode, text); @@ -1025,11 +1025,11 @@ static void setNearestAxis2d(TransInfo *t) /* no correction needed... just use whichever one is lower */ if (abs(t->mval[0] - t->con.imval[0]) < abs(t->mval[1] - t->con.imval[1])) { t->con.mode |= CON_AXIS1; - BLI_strncpy(t->con.text, IFACE_(" along Y axis"), sizeof(t->con.text)); + BLI_strncpy(t->con.text, TIP_(" along Y axis"), sizeof(t->con.text)); } else { t->con.mode |= CON_AXIS0; - BLI_strncpy(t->con.text, IFACE_(" along X axis"), sizeof(t->con.text)); + BLI_strncpy(t->con.text, TIP_(" along X axis"), sizeof(t->con.text)); } } @@ -1081,31 +1081,31 @@ static void setNearestAxis3d(TransInfo *t) if (len[0] <= len[1] && len[0] <= len[2]) { if (t->modifiers & MOD_CONSTRAINT_PLANE) { t->con.mode |= (CON_AXIS1 | CON_AXIS2); - BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" locking %s X axis"), t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" locking %s X axis"), t->spacename); } else { t->con.mode |= CON_AXIS0; - BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along %s X axis"), t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s X axis"), t->spacename); } } else if (len[1] <= len[0] && len[1] <= len[2]) { if (t->modifiers & MOD_CONSTRAINT_PLANE) { t->con.mode |= (CON_AXIS0 | CON_AXIS2); - BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" locking %s Y axis"), t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" locking %s Y axis"), t->spacename); } else { t->con.mode |= CON_AXIS1; - BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along %s Y axis"), t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s Y axis"), t->spacename); } } else if (len[2] <= len[1] && len[2] <= len[0]) { if (t->modifiers & MOD_CONSTRAINT_PLANE) { t->con.mode |= (CON_AXIS0 | CON_AXIS1); - BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" locking %s Z axis"), t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" locking %s Z axis"), t->spacename); } else { t->con.mode |= CON_AXIS2; - BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along %s Z axis"), t->spacename); + BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s Z axis"), t->spacename); } } } diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 70bb2bf98a6..cbe9505d3f2 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -439,25 +439,25 @@ void initTransformOrientation(bContext *C, TransInfo *t) switch (t->orientation.user) { case V3D_ORIENT_GLOBAL: unit_m3(t->spacemtx); - BLI_strncpy(t->spacename, IFACE_("global"), sizeof(t->spacename)); + BLI_strncpy(t->spacename, TIP_("global"), sizeof(t->spacename)); break; case V3D_ORIENT_GIMBAL: unit_m3(t->spacemtx); if (ob && gimbal_axis(ob, t->spacemtx)) { - BLI_strncpy(t->spacename, IFACE_("gimbal"), sizeof(t->spacename)); + BLI_strncpy(t->spacename, TIP_("gimbal"), sizeof(t->spacename)); break; } ATTR_FALLTHROUGH; /* no gimbal fallthrough to normal */ case V3D_ORIENT_NORMAL: if (obedit || (ob && ob->mode & OB_MODE_POSE)) { - BLI_strncpy(t->spacename, IFACE_("normal"), sizeof(t->spacename)); + BLI_strncpy(t->spacename, TIP_("normal"), sizeof(t->spacename)); ED_getTransformOrientationMatrix(C, t->spacemtx, t->around); break; } ATTR_FALLTHROUGH; /* we define 'normal' as 'local' in Object mode */ case V3D_ORIENT_LOCAL: - BLI_strncpy(t->spacename, IFACE_("local"), sizeof(t->spacename)); + BLI_strncpy(t->spacename, TIP_("local"), sizeof(t->spacename)); if (ob) { copy_m3_m4(t->spacemtx, ob->obmat); @@ -474,7 +474,7 @@ void initTransformOrientation(bContext *C, TransInfo *t) RegionView3D *rv3d = t->ar->regiondata; float mat[3][3]; - BLI_strncpy(t->spacename, IFACE_("view"), sizeof(t->spacename)); + BLI_strncpy(t->spacename, TIP_("view"), sizeof(t->spacename)); copy_m3_m4(mat, rv3d->viewinv); normalize_m3(mat); copy_m3_m3(t->spacemtx, mat); @@ -484,13 +484,13 @@ void initTransformOrientation(bContext *C, TransInfo *t) } break; case V3D_ORIENT_CURSOR: { - BLI_strncpy(t->spacename, IFACE_("cursor"), sizeof(t->spacename)); + BLI_strncpy(t->spacename, TIP_("cursor"), sizeof(t->spacename)); BKE_scene_cursor_rot_to_mat3(&t->scene->cursor, t->spacemtx); break; } case V3D_ORIENT_CUSTOM_MATRIX: /* Already set. */ - BLI_strncpy(t->spacename, IFACE_("custom"), sizeof(t->spacename)); + BLI_strncpy(t->spacename, TIP_("custom"), sizeof(t->spacename)); break; case V3D_ORIENT_CUSTOM: BLI_strncpy(t->spacename, t->orientation.custom->name, sizeof(t->spacename)); diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index ace60295148..03c43c8d16d 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -1609,7 +1609,7 @@ static short snapCurve(SnapData *snapdata, bool has_snap = false; /* only vertex snapping mode (eg control points and handles) supported for now) */ - if (snapdata->snap_to_flag != SCE_SNAP_MODE_VERTEX) { + if ((snapdata->snap_to_flag & SCE_SNAP_MODE_VERTEX) == 0) { return 0; } @@ -1640,8 +1640,8 @@ static short snapCurve(SnapData *snapdata, float(*clip_planes)[4] = snapdata->clip_plane; int clip_plane_len = snapdata->clip_plane_len; - if (use_obedit && snapdata->has_occlusion_plane) { - /* In editing mode nurbs are not occluded. */ + if (snapdata->has_occlusion_plane) { + /* We snap to vertices even if coccluded. */ clip_planes++; clip_plane_len--; } @@ -2384,7 +2384,7 @@ static short snapObject(SnapObjectContext *sctx, break; case OB_CURVE: retval = snapCurve(snapdata, ob, obmat, use_obedit, dist_px, r_loc, r_no, r_index); - ATTR_FALLTHROUGH; + break; /* Use ATTR_FALLTHROUGH if we want to snap to the generated mesh. */ case OB_SURF: case OB_FONT: { if (ob->runtime.mesh_eval) { @@ -2757,7 +2757,8 @@ static short transform_snap_context_project_view3d_mixed_impl( snapdata.clip_plane_len = 2; snapdata.has_occlusion_plane = false; - if (has_hit) { + /* By convention we only snap to the original elements of a curve. */ + if (has_hit && ob->type != OB_CURVE) { /* Compute the new clip_pane but do not add it yet. */ float new_clipplane[4]; plane_from_point_normal_v3(new_clipplane, loc, no); diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index c23e004b306..e751c7263cb 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -324,14 +324,14 @@ void unpack_menu(bContext *C, if (!STREQ(abs_name, local_name)) { switch (checkPackedFile(BKE_main_blendfile_path(bmain), local_name, pf)) { case PF_NOFILE: - BLI_snprintf(line, sizeof(line), IFACE_("Create %s"), local_name); + BLI_snprintf(line, sizeof(line), TIP_("Create %s"), local_name); uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr); RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL); RNA_string_set(&props_ptr, "id", id_name); break; case PF_EQUAL: - BLI_snprintf(line, sizeof(line), IFACE_("Use %s (identical)"), local_name); + BLI_snprintf(line, sizeof(line), TIP_("Use %s (identical)"), local_name); // uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_LOCAL); uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr); RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL); @@ -339,13 +339,13 @@ void unpack_menu(bContext *C, break; case PF_DIFFERS: - BLI_snprintf(line, sizeof(line), IFACE_("Use %s (differs)"), local_name); + BLI_snprintf(line, sizeof(line), TIP_("Use %s (differs)"), local_name); // uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_LOCAL); uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr); RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL); RNA_string_set(&props_ptr, "id", id_name); - BLI_snprintf(line, sizeof(line), IFACE_("Overwrite %s"), local_name); + BLI_snprintf(line, sizeof(line), TIP_("Overwrite %s"), local_name); // uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_LOCAL); uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr); RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL); @@ -357,27 +357,27 @@ void unpack_menu(bContext *C, switch (checkPackedFile(BKE_main_blendfile_path(bmain), abs_name, pf)) { case PF_NOFILE: - BLI_snprintf(line, sizeof(line), IFACE_("Create %s"), abs_name); + BLI_snprintf(line, sizeof(line), TIP_("Create %s"), abs_name); // uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_ORIGINAL); uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr); RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL); RNA_string_set(&props_ptr, "id", id_name); break; case PF_EQUAL: - BLI_snprintf(line, sizeof(line), IFACE_("Use %s (identical)"), abs_name); + BLI_snprintf(line, sizeof(line), TIP_("Use %s (identical)"), abs_name); // uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_ORIGINAL); uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr); RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL); RNA_string_set(&props_ptr, "id", id_name); break; case PF_DIFFERS: - BLI_snprintf(line, sizeof(line), IFACE_("Use %s (differs)"), abs_name); + BLI_snprintf(line, sizeof(line), TIP_("Use %s (differs)"), abs_name); // uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_ORIGINAL); uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr); RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL); RNA_string_set(&props_ptr, "id", id_name); - BLI_snprintf(line, sizeof(line), IFACE_("Overwrite %s"), abs_name); + BLI_snprintf(line, sizeof(line), TIP_("Overwrite %s"), abs_name); // uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_ORIGINAL); uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr); RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL); diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index b938f963d9a..76c3a6d6c4a 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -290,7 +290,7 @@ static void stitch_preview_delete(StitchPreviewer *stitch_preview) /* This function updates the header of the UV editor when the stitch tool updates its settings */ static void stitch_update_header(StitchStateContainer *ssc, bContext *C) { - const char *str = IFACE_( + const char *str = TIP_( "Mode(TAB) %s, " "(S)nap %s, " "(M)idpoints %s, " @@ -305,7 +305,7 @@ static void stitch_update_header(StitchStateContainer *ssc, bContext *C) BLI_snprintf(msg, sizeof(msg), str, - ssc->mode == STITCH_VERT ? IFACE_("Vertex") : IFACE_("Edge"), + ssc->mode == STITCH_VERT ? TIP_("Vertex") : TIP_("Edge"), WM_bool_as_string(ssc->snap_islands), WM_bool_as_string(ssc->midpoints), ssc->limit_dist, diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 796594802c4..bb73d61a139 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -727,9 +727,9 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, bool interac param_flush(ms->handle); if (sa) { - BLI_snprintf(str, sizeof(str), IFACE_("Minimize Stretch. Blend %.2f"), ms->blend); + BLI_snprintf(str, sizeof(str), TIP_("Minimize Stretch. Blend %.2f"), ms->blend); ED_area_status_text(sa, str); - ED_workspace_status_text(C, IFACE_("Press + and -, or scroll wheel to set blending")); + ED_workspace_status_text(C, TIP_("Press + and -, or scroll wheel to set blending")); } ms->lasttime = PIL_check_seconds_timer(); |