diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-09-17 17:27:01 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-09-18 17:37:13 +0300 |
commit | 16a384b48556b36394e5423d3e84535e167eea88 (patch) | |
tree | 72261b68048e1e2ada76004c1b5f40687441785f /source/blender/editors/sculpt_paint/paint_cursor.c | |
parent | 04843d1572fea6e572f3cbead89a67e6a1e6e44d (diff) |
Fix T69984: Cursor curve Alpha doesn't display curves other than Custom
Reviewed By: jbakker
Maniphest Tasks: T69984
Differential Revision: https://developer.blender.org/D5823
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index d8f1f0d3eab..a7c7fe4baae 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -91,6 +91,7 @@ typedef struct CursorSnapshot { GLuint overlay_texture; int size; int zoom; + int curve_preset; } CursorSnapshot; static TexSnapshot primary_snap = {0}; @@ -426,7 +427,8 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom) int size; const bool refresh = !cursor_snap.overlay_texture || - (overlay_flags & PAINT_OVERLAY_INVALID_CURVE) || cursor_snap.zoom != zoom; + (overlay_flags & PAINT_OVERLAY_INVALID_CURVE) || cursor_snap.zoom != zoom || + cursor_snap.curve_preset != br->curve_preset; init = (cursor_snap.overlay_texture != 0); @@ -506,6 +508,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); + cursor_snap.curve_preset = br->curve_preset; BKE_paint_reset_overlay_invalid(PAINT_OVERLAY_INVALID_CURVE); return 1; |