Fix paint curve not drawing selection colors properly
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 16 Jul 2019 18:31:23 +0000 (20:31 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 16 Jul 2019 18:31:23 +0000 (20:31 +0200)
This code is not guaranteed to run with any specific space theme, so pass
it explicitly.

source/blender/editors/sculpt_paint/paint_cursor.c

index 65e24cecf82ed8e630785411eafe46e186114534..ac74afce79e07349a54811f1a6c8536a560b8478 100644 (file)
@@ -964,9 +964,9 @@ static void paint_draw_curve_cursor(Brush *brush, ViewContext *vc)
     immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
     float selec_col[4], handle_col[4], pivot_col[4];
-    UI_GetThemeColor4fv(TH_VERTEX_SELECT, selec_col);
-    UI_GetThemeColor4fv(TH_PAINT_CURVE_HANDLE, handle_col);
-    UI_GetThemeColor4fv(TH_PAINT_CURVE_PIVOT, pivot_col);
+    UI_GetThemeColorType4fv(TH_VERTEX_SELECT, SPACE_VIEW3D, selec_col);
+    UI_GetThemeColorType4fv(TH_PAINT_CURVE_HANDLE, SPACE_VIEW3D, handle_col);
+    UI_GetThemeColorType4fv(TH_PAINT_CURVE_PIVOT, SPACE_VIEW3D, pivot_col);
 
     for (i = 0; i < pc->tot_points - 1; i++, cp++) {
       int j;