Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_draw.c26
-rw-r--r--source/blender/editors/space_nla/nla_edit.c6
-rw-r--r--source/blender/editors/space_nla/space_nla.c2
3 files changed, 11 insertions, 23 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 97939a93d01..b0d5360e29b 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -321,7 +321,7 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc, uin
/* draw with AA'd line */
GPU_line_smooth(true);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
/* influence -------------------------- */
if (strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) {
@@ -374,7 +374,7 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc, uin
/* turn off AA'd lines */
GPU_line_smooth(false);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
/* helper call to setup dashed-lines for strip outlines */
@@ -434,9 +434,7 @@ static void nla_draw_strip(SpaceNla *snla,
*/
if ((strip->extendmode != NLASTRIP_EXTEND_NOTHING) && (non_solo == 0)) {
/* enable transparency... */
- GPU_blend_set_func_separate(
- GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
switch (strip->extendmode) {
/* since this does both sides,
@@ -468,7 +466,7 @@ static void nla_draw_strip(SpaceNla *snla,
break;
}
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
/* draw 'inside' of strip itself */
@@ -487,9 +485,9 @@ static void nla_draw_strip(SpaceNla *snla,
/* strip is in disabled track - make less visible */
immUniformColor3fvAlpha(color, 0.1f);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
immRectf(shdr_pos, strip->start, yminc, strip->end, ymaxc);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
/* draw strip's control 'curves'
@@ -746,9 +744,7 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *region)
/* just draw a semi-shaded rect spanning the width of the viewable area if there's data,
* and a second darker rect within which we draw keyframe indicator dots if there's data
*/
- GPU_blend_set_func_separate(
- GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
/* get colors for drawing */
float color[4];
@@ -790,7 +786,7 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *region)
nla_action_draw_keyframes(
v2d, adt, ale->data, ycenter, ymin + NLACHANNEL_SKIP, ymax - NLACHANNEL_SKIP);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
break;
}
}
@@ -854,9 +850,7 @@ void draw_nla_channel_list(const bContext *C, bAnimContext *ac, ARegion *region)
float ymax = NLACHANNEL_FIRST_TOP(ac);
/* set blending again, as may not be set in previous step */
- GPU_blend_set_func_separate(
- GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
/* loop through channels, and set up drawing depending on their type */
for (ale = anim_data.first; ale;
@@ -876,7 +870,7 @@ void draw_nla_channel_list(const bContext *C, bAnimContext *ac, ARegion *region)
UI_block_end(C, block);
UI_block_draw(C, block);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
/* free temporary channels */
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index bc9bd0e18f2..dc8f616c5e6 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -1847,11 +1847,7 @@ static int nlaedit_sync_actlen_exec(bContext *C, wmOperator *op)
continue;
}
- /* recalculate the length of the action */
- calc_action_range(strip->act, &strip->actstart, &strip->actend, 0);
-
- /* adjust the strip extents in response to this */
- BKE_nlastrip_recalculate_bounds(strip);
+ BKE_nlastrip_recalculate_bounds_sync_action(strip);
ale->update |= ANIM_UPDATE_DEPS;
}
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 7bbfe451eed..7a0cd35ece1 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -194,7 +194,6 @@ static void nla_channel_region_draw(const bContext *C, ARegion *region)
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
- GPU_clear(GPU_COLOR_BIT);
UI_view2d_view_ortho(v2d);
@@ -238,7 +237,6 @@ static void nla_main_region_draw(const bContext *C, ARegion *region)
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
- GPU_clear(GPU_COLOR_BIT);
UI_view2d_view_ortho(v2d);