diff options
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 14 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 7 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 8 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 44 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_markers.c | 26 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 7 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 5 | ||||
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 4 | ||||
-rw-r--r-- | source/blender/editors/animation/time_scrub_ui.c | 6 |
11 files changed, 65 insertions, 59 deletions
diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt index 6adfab6e921..a72b2874f95 100644 --- a/source/blender/editors/animation/CMakeLists.txt +++ b/source/blender/editors/animation/CMakeLists.txt @@ -12,7 +12,6 @@ set(INC ../../sequencer ../../windowmanager ../../../../intern/clog - ../../../../intern/glew-mx ../../../../intern/guardedalloc # RNA_prototypes.h ${CMAKE_BINARY_DIR}/source/blender/makesrna diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index f665ec27b07..8edeea49cbb 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -157,7 +157,7 @@ static void acf_generic_dataexpand_backdrop(bAnimContext *ac, /* set backdrop drawing color */ acf->get_backdrop_color(ac, ale, color); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); immUniformColor3fv(color); /* no rounded corner - just rectangular box */ @@ -246,7 +246,7 @@ static void acf_generic_channel_backdrop(bAnimContext *ac, /* set backdrop drawing color */ acf->get_backdrop_color(ac, ale, color); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); immUniformColor3fv(color); /* no rounded corners - just rectangular box */ @@ -4449,7 +4449,7 @@ void ANIM_channel_draw( uint pos = GPU_vertformat_attr_add( immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); /* F-Curve channels need to have a special 'color code' box drawn, * which is colored with whatever color the curve has stored. @@ -4513,7 +4513,7 @@ void ANIM_channel_draw( uint pos = GPU_vertformat_attr_add( immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); /* FIXME: replace hardcoded color here, and check on extents! */ immUniformColor3f(1.0f, 0.0f, 0.0f); @@ -4549,7 +4549,7 @@ void ANIM_channel_draw( float color[3]; uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); /* get and set backdrop color */ acf->get_backdrop_color(ac, ale, color); @@ -5353,8 +5353,8 @@ void ANIM_channel_draw_widgets(const bContext *C, * and wouldn't be able to auto-keyframe. * - Slider should start before the toggles (if they're visible) * to keep a clean line down the side. - * - Sliders are always drawn in Shapekey mode now. Prior to this - * the SACTION_SLIDERS flag would be set when changing into Shapekey mode. + * - Sliders are always drawn in Shape-key mode now. Prior to this + * the SACTION_SLIDERS flag would be set when changing into shape-key mode. */ if (((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 06a62b7a9de..ea631da27af 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -31,6 +31,7 @@ #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_gpencil.h" +#include "BKE_layer.h" #include "BKE_lib_id.h" #include "BKE_mask.h" #include "BKE_nla.h" @@ -2953,6 +2954,7 @@ static int click_select_channel_object(bContext *C, bAnimListElem *ale, const short /* eEditKeyframes_Select or -1 */ selectmode) { + Scene *scene = ac->scene; ViewLayer *view_layer = ac->view_layer; Base *base = (Base *)ale->data; Object *ob = base->object; @@ -2971,11 +2973,10 @@ static int click_select_channel_object(bContext *C, } } else { - Base *b; - /* deselect all */ + BKE_view_layer_synced_ensure(scene, view_layer); /* TODO: should this deselect all other types of channels too? */ - for (b = view_layer->object_bases.first; b; b = b->next) { + LISTBASE_FOREACH (Base *, b, BKE_view_layer_object_bases_get(view_layer)) { ED_object_base_select(b, BA_DESELECT); if (b->object->adt) { b->object->adt->flag &= ~(ADT_UI_SELECTED | ADT_UI_ACTIVE); diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index e352b4e26fe..06a0077df9b 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -60,7 +60,7 @@ void ANIM_draw_cfra(const bContext *C, View2D *v2d, short flag) GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); /* Draw a light green line to indicate current frame */ immUniformThemeColor(TH_CFRAME); @@ -87,7 +87,7 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width) GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); immUniformThemeColorShadeAlpha(TH_ANIM_PREVIEW_RANGE, -25, -30); /* XXX: Fix this hardcoded color (anim_active) */ // immUniformColor4f(0.8f, 0.44f, 0.1f, 0.2f); @@ -118,7 +118,7 @@ void ANIM_draw_framerange(Scene *scene, View2D *v2d) GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); immUniformThemeColorShadeAlpha(TH_BACK, -25, -100); if (scene->r.sfra < scene->r.efra) { @@ -193,7 +193,7 @@ void ANIM_draw_action_framerange( GPU_blend(GPU_BLEND_NONE); /* Thin lines where the actual frames are. */ - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); immUniformThemeColorShade(TH_BACK, -60); GPU_line_width(1.0f); diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index d9eeed94868..5b4d436b0e0 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -118,11 +118,13 @@ static void animedit_get_yscale_factor(bAnimContext *ac) /* NOTE: there's a similar function in key.c #BKE_key_from_object. */ static Key *actedit_get_shapekeys(bAnimContext *ac) { + Scene *scene = ac->scene; ViewLayer *view_layer = ac->view_layer; Object *ob; Key *key; - ob = OBACT(view_layer); + BKE_view_layer_synced_ensure(scene, view_layer); + ob = BKE_view_layer_active_object_get(view_layer); if (ob == NULL) { return NULL; } @@ -393,12 +395,13 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) /* get useful default context settings from context */ ac->bmain = bmain; ac->scene = scene; + ac->view_layer = CTX_data_view_layer(C); if (scene) { ac->markers = ED_context_get_markers(C); + BKE_view_layer_synced_ensure(ac->scene, ac->view_layer); } - ac->view_layer = CTX_data_view_layer(C); ac->depsgraph = CTX_data_depsgraph_pointer(C); - ac->obact = (ac->view_layer->basact) ? ac->view_layer->basact->object : NULL; + ac->obact = BKE_view_layer_active_object_get(ac->view_layer); ac->area = area; ac->region = region; ac->sl = sl; @@ -1846,8 +1849,8 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, bDopeSheet *ads = ac->ads; size_t items = 0; + Scene *scene = ac->scene; ViewLayer *view_layer = (ViewLayer *)ac->view_layer; - Base *base; /* Include all annotation datablocks. */ if (((ads->filterflag & ADS_FILTER_ONLYSEL) == 0) || @@ -1859,7 +1862,8 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, } } /* Objects in the scene */ - for (base = view_layer->object_bases.first; base; base = base->next) { + BKE_view_layer_synced_ensure(scene, view_layer); + LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(view_layer)) { /* Only consider this object if it has got some GP data (saving on all the other tests) */ if (base->object && (base->object->type == OB_GPENCIL)) { Object *ob = base->object; @@ -1876,8 +1880,8 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, if ((filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) { /* Layer visibility - we check both object and base, * since these may not be in sync yet. */ - if ((base->flag & BASE_VISIBLE_DEPSGRAPH) == 0 || - (base->flag & BASE_VISIBLE_VIEWLAYER) == 0) { + if ((base->flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT) == 0 || + (base->flag & BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT) == 0) { continue; } @@ -3089,7 +3093,8 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, */ if ((filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) { /* layer visibility - we check both object and base, since these may not be in sync yet */ - if ((base->flag & BASE_VISIBLE_DEPSGRAPH) == 0 || (base->flag & BASE_VISIBLE_VIEWLAYER) == 0) { + if ((base->flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT) == 0 || + (base->flag & BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT) == 0) { return false; } @@ -3169,16 +3174,19 @@ static int ds_base_sorting_cmp(const void *base1_ptr, const void *base2_ptr) /* Get a sorted list of all the bases - for inclusion in dopesheet (when drawing channels) */ static Base **animdata_filter_ds_sorted_bases(bDopeSheet *ads, + const Scene *scene, ViewLayer *view_layer, int filter_mode, size_t *r_usable_bases) { /* Create an array with space for all the bases, but only containing the usable ones */ - size_t tot_bases = BLI_listbase_count(&view_layer->object_bases); + BKE_view_layer_synced_ensure(scene, view_layer); + ListBase *object_bases = BKE_view_layer_object_bases_get(view_layer); + size_t tot_bases = BLI_listbase_count(object_bases); size_t num_bases = 0; Base **sorted_bases = MEM_mallocN(sizeof(Base *) * tot_bases, "Dopesheet Usable Sorted Bases"); - LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { + LISTBASE_FOREACH (Base *, base, object_bases) { if (animdata_filter_base_is_ok(ads, base, OB_MODE_OBJECT, filter_mode)) { sorted_bases[num_bases++] = base; } @@ -3248,14 +3256,17 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac, * - Don't do this if this behavior has been turned off (i.e. due to it being too slow) * - Don't do this if there's just a single object */ + BKE_view_layer_synced_ensure(scene, view_layer); + ListBase *object_bases = BKE_view_layer_object_bases_get(view_layer); if ((filter_mode & ANIMFILTER_LIST_CHANNELS) && !(ads->flag & ADS_FLAG_NO_DB_SORT) && - (view_layer->object_bases.first != view_layer->object_bases.last)) { + (object_bases->first != object_bases->last)) { /* Filter list of bases (i.e. objects), sort them, then add their contents normally... */ /* TODO: Cache the old sorted order - if the set of bases hasn't changed, don't re-sort... */ Base **sorted_bases; size_t num_bases; - sorted_bases = animdata_filter_ds_sorted_bases(ads, view_layer, filter_mode, &num_bases); + sorted_bases = animdata_filter_ds_sorted_bases( + ads, scene, view_layer, filter_mode, &num_bases); if (sorted_bases) { /* Add the necessary channels for these bases... */ for (size_t i = 0; i < num_bases; i++) { @@ -3272,9 +3283,9 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac, /* Filter and add contents of each base (i.e. object) without them sorting first * NOTE: This saves performance in cases where order doesn't matter */ - Object *obact = OBACT(view_layer); + Object *obact = BKE_view_layer_active_object_get(view_layer); const eObjectMode object_mode = obact ? obact->mode : OB_MODE_OBJECT; - LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { + LISTBASE_FOREACH (Base *, base, object_bases) { if (animdata_filter_base_is_ok(ads, base, object_mode, filter_mode)) { /* since we're still here, this object should be usable */ items += animdata_filter_dopesheet_ob(ac, anim_data, ads, base, filter_mode); @@ -3406,9 +3417,8 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data) GSet *gs; size_t items = 0; - /* build new hashtable to efficiently store and retrieve which entries have been - * encountered already while searching - */ + /* Build new hash-table to efficiently store and retrieve which entries have been + * encountered already while searching. */ gs = BLI_gset_ptr_new(__func__); /* loop through items, removing them from the list if a similar item occurs already */ diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index e7c7f679b16..94746837259 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -51,7 +51,6 @@ #include "ED_screen.h" #include "ED_select_utils.h" #include "ED_transform.h" -#include "ED_types.h" #include "ED_util.h" #include "DEG_depsgraph.h" @@ -437,7 +436,7 @@ static void draw_marker_line(const uchar *color, int xpos, int ymin, int ymax) GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR); float viewport_size[4]; GPU_viewport_size_get_f(viewport_size); @@ -459,9 +458,7 @@ static void draw_marker_line(const uchar *color, int xpos, int ymin, int ymax) static int marker_get_icon_id(TimeMarker *marker, int flag) { if (flag & DRAW_MARKERS_LOCAL) { - return (marker->flag & ACTIVE) ? ICON_PMARKER_ACT : - (marker->flag & SELECT) ? ICON_PMARKER_SEL : - ICON_PMARKER; + return (marker->flag & SELECT) ? ICON_PMARKER_SEL : ICON_PMARKER; } #ifdef DURIAN_CAMERA_SWITCH if (marker->camera) { @@ -503,7 +500,7 @@ static void draw_marker(const uiFontStyle *fstyle, static void draw_markers_background(rctf *rect) { uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); uchar shade[4]; UI_GetThemeColor4ubv(TH_TIME_SCRUB_BACKGROUND, shade); @@ -1113,7 +1110,7 @@ static void MARKER_OT_move(wmOperatorType *ot) RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX); PropertyRNA *prop = RNA_def_boolean( ot->srna, "tweak", 0, "Tweak", "Operator has been activated using a click-drag event"); - RNA_def_property_flag(prop, PROP_SKIP_SAVE); + RNA_def_property_flag(prop, PROP_SKIP_SAVE | PROP_HIDDEN); } /** \} */ @@ -1258,14 +1255,14 @@ static int select_timeline_marker_frame(ListBase *markers, deselect_markers(markers); } - LISTBASE_CIRCULAR_FORWARD_BEGIN (markers, marker, marker_cycle_selected) { + LISTBASE_CIRCULAR_FORWARD_BEGIN (TimeMarker *, markers, marker, marker_cycle_selected) { /* this way a not-extend select will always give 1 selected marker */ if (marker->frame == frame) { marker->flag ^= SELECT; break; } } - LISTBASE_CIRCULAR_FORWARD_END(markers, marker, marker_cycle_selected); + LISTBASE_CIRCULAR_FORWARD_END(TimeMarker *, markers, marker, marker_cycle_selected); } return ret_val; @@ -1284,7 +1281,7 @@ static void select_marker_camera_switch( int sel = 0; if (!extend) { - BKE_view_layer_base_deselect_all(view_layer); + BKE_view_layer_base_deselect_all(scene, view_layer); } for (marker = markers->first; marker; marker = marker->next) { @@ -1294,6 +1291,7 @@ static void select_marker_camera_switch( } } + BKE_view_layer_synced_ensure(scene, view_layer); for (marker = markers->first; marker; marker = marker->next) { if (marker->camera) { if (marker->frame == cfra) { @@ -1381,7 +1379,7 @@ static void MARKER_OT_select(wmOperatorType *ot) ot->modal = WM_generic_select_modal; /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; + ot->flag = OPTYPE_UNDO; WM_operator_properties_generic_select(ot); prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); @@ -1481,7 +1479,7 @@ static void MARKER_OT_select_box(wmOperatorType *ot) ot->poll = ed_markers_poll_markers_exist; /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; + ot->flag = OPTYPE_UNDO; /* properties */ WM_operator_properties_gesture_box(ot); @@ -1605,8 +1603,8 @@ static void MARKER_OT_select_leftright(wmOperatorType *ot) /* rna storage */ RNA_def_enum( - ot->srna, "mode", prop_markers_select_leftright_modes, MARKERS_LRSEL_LEFT, "mode", "Mode"); - RNA_def_boolean(ot->srna, "extend", false, "extend", "Extend"); + ot->srna, "mode", prop_markers_select_leftright_modes, MARKERS_LRSEL_LEFT, "Mode", ""); + RNA_def_boolean(ot->srna, "extend", false, "Extend Select", ""); } /** \} */ diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 786204a52ed..6df9dc1e86d 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -608,7 +608,7 @@ static AnimKeylistDrawListElem *ed_keylist_draw_list_add_elem( return draw_elem; } -/* *************************** Channel Drawing Funcs *************************** */ +/* *************************** Channel Drawing Functions *************************** */ void draw_summary_channel(struct AnimKeylistDrawList *draw_list, bAnimContext *ac, diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 63bd5665459..2a94c5db439 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -1303,7 +1303,8 @@ void ANIM_fcurve_equalize_keyframes_loop(FCurve *fcu, /* Perform handle equalization if mode is 'Both' or 'Left'. */ if (mode & EQUALIZE_HANDLES_LEFT) { - /*If left handle type is 'Auto', 'Auto Clamped', or 'Vector', convert handles to 'Aligned'.*/ + /* If left handle type is 'Auto', 'Auto Clamped', or 'Vector', convert handles to 'Aligned'. + */ if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) { bezt->h1 = HD_ALIGN; bezt->h2 = HD_ALIGN; @@ -1319,8 +1320,8 @@ void ANIM_fcurve_equalize_keyframes_loop(FCurve *fcu, /* Perform handle equalization if mode is 'Both' or 'Right'. */ if (mode & EQUALIZE_HANDLES_RIGHT) { - /*If right handle type is 'Auto', 'Auto Clamped', or 'Vector', convert handles to - * 'Aligned'.*/ + /* If right handle type is 'Auto', 'Auto Clamped', or 'Vector', convert handles to + * 'Aligned'. */ if (ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) { bezt->h1 = HD_ALIGN; bezt->h2 = HD_ALIGN; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 12f83343299..acf53541843 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1081,10 +1081,7 @@ static float *visualkey_get_values( } if (strstr(identifier, "rotation_quaternion")) { - float mat3[3][3]; - - copy_m3_m4(mat3, tmat); - mat3_to_quat_is_ok(buffer, mat3); + mat4_to_quat(buffer, tmat); *r_count = 4; return buffer; diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 967a324ef95..97e90af019b 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -589,7 +589,7 @@ void ANIM_keyingset_info_unregister(Main *bmain, KeyingSetInfo *ksi) /* find relevant builtin KeyingSets which use this, and remove them */ /* TODO: this isn't done now, since unregister is really only used at the moment when we - * reload the scripts, which kindof defeats the purpose of "builtin"? */ + * reload the scripts, which kind of defeats the purpose of "builtin"? */ for (ks = builtin_keyingsets.first; ks; ks = ksn) { ksn = ks->next; @@ -714,7 +714,7 @@ static void anim_keyingset_visit_for_search_impl(const bContext *C, void *visit_user_data, const bool use_poll) { - /* Poll requires context. */ + /* Poll requires context. */ if (use_poll && (C == NULL)) { return; } diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c index 623d4e605ba..ebeac6552cd 100644 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@ -48,7 +48,7 @@ static int get_centered_text_y(const rcti *rect) 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); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); immUniformThemeColor(TH_TIME_SCRUB_BACKGROUND); @@ -97,7 +97,7 @@ static void draw_current_frame(const Scene *scene, uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); GPU_blend(GPU_BLEND_ALPHA); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); /* Outline. */ immUniformThemeColorShadeAlpha(TH_BACK, -25, -100); @@ -208,7 +208,7 @@ void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *region, bDope rect.ymax = region->winy; uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); immUniformThemeColor(TH_BACK); immRectf(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax); immUnbindProgram(); |