[Bf-blender-cvs] [16a384b4855] master: Fix T69984: Cursor curve Alpha doesn't display curves other than Custom

Pablo Dobarro noreply at git.blender.org
Wed Sep 18 16:35:24 CEST 2019


Commit: 16a384b48556b36394e5423d3e84535e167eea88
Author: Pablo Dobarro
Date:   Tue Sep 17 16:27:01 2019 +0200
Branches: master
https://developer.blender.org/rB16a384b48556b36394e5423d3e84535e167eea88

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

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

M	source/blender/editors/sculpt_paint/paint_cursor.c

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

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;



More information about the Bf-blender-cvs mailing list