[Bf-blender-cvs] [7bf8d8b3c89] master: Cleanup: use time scrub instead of scrubbing

Campbell Barton noreply at git.blender.org
Tue May 28 08:20:27 CEST 2019


Commit: 7bf8d8b3c89cfda3245c1e36e03279c1c970740b
Author: Campbell Barton
Date:   Tue May 28 16:17:15 2019 +1000
Branches: master
https://developer.blender.org/rB7bf8d8b3c89cfda3245c1e36e03279c1c970740b

Cleanup: use time scrub instead of scrubbing

Renaming was only done to ED_time_scrub_ui.h, function names
and struct members used term 'scrubbing' which is ambiguous.

===================================================================

M	release/datafiles/userdef/userdef_default_theme.c
M	release/scripts/presets/keyconfig/keymap_data/blender_default.py
M	source/blender/blenloader/intern/versioning_userdef.c
M	source/blender/editors/animation/anim_markers.c
M	source/blender/editors/animation/time_scrub_ui.c
M	source/blender/editors/include/ED_anim_api.h
M	source/blender/editors/include/ED_time_scrub_ui.h
M	source/blender/editors/include/UI_resources.h
M	source/blender/editors/include/UI_view2d.h
M	source/blender/editors/interface/resources.c
M	source/blender/editors/interface/view2d.c
M	source/blender/editors/screen/area.c
M	source/blender/editors/space_action/space_action.c
M	source/blender/editors/space_clip/clip_intern.h
M	source/blender/editors/space_clip/space_clip.c
M	source/blender/editors/space_graph/graph_edit.c
M	source/blender/editors/space_graph/space_graph.c
M	source/blender/editors/space_nla/space_nla.c
M	source/blender/editors/space_sequencer/sequencer_draw.c
M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/makesdna/intern/dna_rename_defs.h
M	source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c
index b5cab405826..e1794495ee6 100644
--- a/release/datafiles/userdef/userdef_default_theme.c
+++ b/release/datafiles/userdef/userdef_default_theme.c
@@ -428,7 +428,7 @@ const bTheme U_theme_default = {
     .vertex = RGBA(0x000000ff),
     .vertex_select = RGBA(0xff8500ff),
     .cframe = RGBA(0x5680c2ff),
-    .scrubbing_background = RGBA(0x292929e6),
+    .time_scrub_background = RGBA(0x292929e6),
     .lastsel_point = RGBA(0xffffffff),
     .handle_auto = RGBA(0x909000ff),
     .handle_vect = RGBA(0x409030ff),
@@ -515,7 +515,7 @@ const bTheme U_theme_default = {
     .strip = RGBA(0x1a151580),
     .strip_select = RGBA(0xff8c00cc),
     .cframe = RGBA(0x5680c2ff),
-    .scrubbing_background = RGBA(0x292929e6),
+    .time_scrub_background = RGBA(0x292929e6),
     .ds_channel = RGBA(0x0f2c4d24),
     .ds_subchannel = RGBA(0x143e6624),
     .ds_ipoline = RGBA(0x94e575cc),
@@ -569,7 +569,7 @@ const bTheme U_theme_default = {
     .strip = RGBA(0x0c0a0a80),
     .strip_select = RGBA(0xff8c00ff),
     .cframe = RGBA(0x5680c2ff),
-    .scrubbing_background = RGBA(0x292929e6),
+    .time_scrub_background = RGBA(0x292929e6),
     .ds_channel = RGBA(0x5a85b2ff),
     .ds_subchannel = RGBA(0x7d98b3ff),
     .keyborder = RGBA(0x000000ff),
@@ -616,7 +616,7 @@ const bTheme U_theme_default = {
     .vertex_select = RGBA(0xff8500ff),
     .bone_pose = RGBA(0x50c8ff50),
     .cframe = RGBA(0x5680c2ff),
-    .scrubbing_background = RGBA(0x292929e6),
+    .time_scrub_background = RGBA(0x292929e6),
     .vertex_size = 3,
     .outline_width = 1,
     .facedot_size = 4,
@@ -894,7 +894,7 @@ const bTheme U_theme_default = {
     .strip = RGBA(0x0c0a0a80),
     .strip_select = RGBA(0xff8c00ff),
     .cframe = RGBA(0x5680c2ff),
-    .scrubbing_background = RGBA(0x292929e6),
+    .time_scrub_background = RGBA(0x292929e6),
     .handle_auto = RGBA(0x909000ff),
     .handle_align = RGBA(0x803060ff),
     .handle_sel_auto = RGBA(0xf0ff40ff),
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index cba0ec88c19..2935b397326 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -1261,10 +1261,10 @@ def km_markers(params):
     return keymap
 
 
-def km_scrubbing(params):
+def km_time_scrub(params):
     items = []
     keymap = (
-        "Scrubbing",
+        "Time Scrub",
         {"space_type": 'EMPTY', "region_type": 'WINDOW'},
         {"items": items},
     )
@@ -1276,10 +1276,10 @@ def km_scrubbing(params):
 
     return keymap
 
-def km_scrubbing_clip(params):
+def km_time_scrub_clip(params):
     items = []
     keymap = (
-        "Clip Scrubbing",
+        "Clip Time Scrub",
         {"space_type": 'CLIP_EDITOR', "region_type": 'PREVIEW'},
         {"items": items},
     )
@@ -5760,8 +5760,8 @@ def generate_keymaps(params=None):
         km_view3d(params),
         km_mask_editing(params),
         km_markers(params),
-        km_scrubbing(params),
-        km_scrubbing_clip(params),
+        km_time_scrub(params),
+        km_time_scrub_clip(params),
         km_graph_editor_generic(params),
         km_graph_editor(params),
         km_image_generic(params),
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index d1cb9d32212..89f4d86b1b8 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -127,11 +127,11 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
     FROM_DEFAULT_V4_UCHAR(space_sequencer.text);
     FROM_DEFAULT_V4_UCHAR(space_clip.text);
 
-    FROM_DEFAULT_V4_UCHAR(space_graph.scrubbing_background);
-    FROM_DEFAULT_V4_UCHAR(space_action.scrubbing_background);
-    FROM_DEFAULT_V4_UCHAR(space_nla.scrubbing_background);
-    FROM_DEFAULT_V4_UCHAR(space_sequencer.scrubbing_background);
-    FROM_DEFAULT_V4_UCHAR(space_clip.scrubbing_background);
+    FROM_DEFAULT_V4_UCHAR(space_graph.time_scrub_background);
+    FROM_DEFAULT_V4_UCHAR(space_action.time_scrub_background);
+    FROM_DEFAULT_V4_UCHAR(space_nla.time_scrub_background);
+    FROM_DEFAULT_V4_UCHAR(space_sequencer.time_scrub_background);
+    FROM_DEFAULT_V4_UCHAR(space_clip.time_scrub_background);
   }
 
   if (!USER_VERSION_ATLEAST(280, 67)) {
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 876bc9ae3e4..90632da8a7c 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -482,7 +482,7 @@ static void draw_markers_background(rctf *rect)
   immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
   unsigned char shade[4];
-  UI_GetThemeColor4ubv(TH_SCRUBBING_BACKGROUND, shade);
+  UI_GetThemeColor4ubv(TH_TIME_SCRUB_BACKGROUND, shade);
 
   immUniformColor4ubv(shade);
 
diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c
index 37e7eab74d4..70a9b7ba1fa 100644
--- a/source/blender/editors/animation/time_scrub_ui.c
+++ b/source/blender/editors/animation/time_scrub_ui.c
@@ -46,12 +46,12 @@
 
 #include "RNA_access.h"
 
-static void get_scrubbing_region_rect(const ARegion *ar, rcti *rect)
+static void get_time_scrub_region_rect(const ARegion *ar, rcti *rect)
 {
   rect->xmin = 0;
   rect->xmax = ar->winx;
   rect->ymax = ar->winy;
-  rect->ymin = rect->ymax - UI_SCRUBBING_MARGIN_Y;
+  rect->ymin = rect->ymax - UI_TIME_SCRUB_MARGIN_Y;
 }
 
 static int get_centered_text_y(const rcti *rect)
@@ -64,7 +64,7 @@ static void draw_background(const rcti *rect)
   uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
   immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
-  immUniformThemeColor(TH_SCRUBBING_BACKGROUND);
+  immUniformThemeColor(TH_TIME_SCRUB_BACKGROUND);
 
   GPU_blend(true);
   GPU_blend_set_func_separate(
@@ -91,7 +91,7 @@ static void get_current_time_str(
 static void draw_current_frame(const Scene *scene,
                                bool display_seconds,
                                const View2D *v2d,
-                               const rcti *scrubbing_region_rect,
+                               const rcti *scrub_region_rect,
                                int current_frame)
 {
   const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
@@ -111,9 +111,9 @@ static void draw_current_frame(const Scene *scene,
 
   UI_draw_roundbox_3fvAlpha(true,
                             frame_x - box_width / 2 + U.pixelsize / 2,
-                            scrubbing_region_rect->ymin + box_padding,
+                            scrub_region_rect->ymin + box_padding,
                             frame_x + box_width / 2 + U.pixelsize / 2,
-                            scrubbing_region_rect->ymax - box_padding,
+                            scrub_region_rect->ymax - box_padding,
                             4 * UI_DPI_FAC,
                             bg_color,
                             1.0f);
@@ -121,36 +121,36 @@ static void draw_current_frame(const Scene *scene,
   UI_GetThemeColorShade4fv(TH_CFRAME, 5, bg_color);
   UI_draw_roundbox_aa(false,
                       frame_x - box_width / 2 + U.pixelsize / 2,
-                      scrubbing_region_rect->ymin + box_padding,
+                      scrub_region_rect->ymin + box_padding,
                       frame_x + box_width / 2 + U.pixelsize / 2,
-                      scrubbing_region_rect->ymax - box_padding,
+                      scrub_region_rect->ymax - box_padding,
                       4 * UI_DPI_FAC,
                       bg_color);
 
   UI_fontstyle_draw_simple(fstyle,
                            frame_x - text_width / 2 + U.pixelsize / 2,
-                           get_centered_text_y(scrubbing_region_rect),
+                           get_centered_text_y(scrub_region_rect),
                            frame_str,
                            color);
 }
 
-void ED_scrubbing_draw(const ARegion *ar,
-                       const Scene *scene,
-                       bool display_seconds,
-                       bool discrete_frames)
+void ED_time_scrub_draw(const ARegion *ar,
+                        const Scene *scene,
+                        bool display_seconds,
+                        bool discrete_frames)
 {
   const View2D *v2d = &ar->v2d;
 
   GPU_matrix_push_projection();
   wmOrtho2_region_pixelspace(ar);
 
-  rcti scrubbing_region_rect;
-  get_scrubbing_region_rect(ar, &scrubbing_region_rect);
+  rcti scrub_region_rect;
+  get_time_scrub_region_rect(ar, &scrub_region_rect);
 
-  draw_background(&scrubbing_region_rect);
+  draw_background(&scrub_region_rect);
 
-  rcti numbers_rect = scrubbing_region_rect;
-  numbers_rect.ymin = get_centered_text_y(&scrubbing_region_rect) - 4 * UI_DPI_FAC;
+  rcti numbers_rect = scrub_region_rect;
+  numbers_rect.ymin = get_centered_text_y(&scrub_region_rect) - 4 * UI_DPI_FAC;
   if (discrete_frames) {
     UI_view2d_draw_scale_x__discrete_frames_or_seconds(
         ar, v2d, &numbers_rect, scene, display_seconds, TH_TEXT);
@@ -160,19 +160,19 @@ void ED_scrubbing_draw(const ARegion *ar,
         ar, v2d, &numbers_rect, scene, display_seconds, TH_TEXT);
   }
 
-  draw_current_frame(scene, display_seconds, v2d, &scrubbing_region_rect, scene->r.cfra);
+  draw_current_frame(scene, display_seconds, v2d, &scrub_region_rect, scene->r.cfra);
 
   GPU_matrix_pop_projection();
 }
 
-bool ED_event_in_scrubbing_region(const ARegion *ar, const wmEvent *event)
+bool ED_time_scrub_event_in_region(const ARegion *ar, const wmEvent *event)
 {
   rcti rect = ar->winrct;
-  rect.ymin = rect.ymax - UI_SCRUBBING_MARGIN_Y;
+  rect.ymin = rect.ymax - UI_TIME_SCRUB_MARGIN_Y;
   return BLI_rcti_isect_pt(&rect, event->x, event->y);
 }
 
-void ED_channel_search_draw(const bContext *C, ARegion *ar, bDopeSheet *dopesheet)
+void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *ar, bDopeSheet *dopesheet)
 {
   GPU_matr

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list