[Bf-blender-cvs] [a4b72a41a45] greasepencil-object: Cleanup: Remove color picker defines from headers
Joshua Leung
noreply at git.blender.org
Wed Feb 7 01:09:34 CET 2018
Commit: a4b72a41a4509f125cc3d47eae5d323f138afc3a
Author: Joshua Leung
Date: Wed Feb 7 12:33:28 2018 +1300
Branches: greasepencil-object
https://developer.blender.org/rBa4b72a41a4509f125cc3d47eae5d323f138afc3a
Cleanup: Remove color picker defines from headers
There's no need for these defines to be in any headers, as this operator
is entirely self-contained in its own file now.
===================================================================
M source/blender/editors/gpencil/gpencil_colorpick.c
M source/blender/editors/gpencil/gpencil_intern.h
M source/blender/editors/include/ED_gpencil.h
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_colorpick.c b/source/blender/editors/gpencil/gpencil_colorpick.c
index 3e7cdb3bebf..2042fa89a96 100644
--- a/source/blender/editors/gpencil/gpencil_colorpick.c
+++ b/source/blender/editors/gpencil/gpencil_colorpick.c
@@ -79,6 +79,43 @@
#define GP_BOX_SIZE (32 * U.ui_scale)
#define GP_BOX_GAP (24 * U.ui_scale)
+/* Representation of a color displayed in the picker */
+typedef struct tGPDpickColor {
+ char name[64]; /* color name. Must be unique. */
+ rcti full_rect; /* full size of region occupied by color box (for event/highlight handling) */
+ rcti rect; /* box position */
+ int index; /* index of color in palette */
+ float rgba[4]; /* color */
+ float fill[4]; /* fill color */
+ bool fillmode; /* flag fill is not enabled */
+} tGPDpickColor;
+
+/* Temporary color picker operation data (op->customdata) */
+typedef struct tGPDpick {
+ struct wmWindow *win; /* window */
+ struct Scene *scene; /* current scene from context */
+ struct ToolSettings *ts; /* current toolsettings from context */
+ struct Object *ob; /* current active gp object */
+ struct ScrArea *sa; /* area where painting originated */
+ struct ARegion *ar; /* region where painting originated */
+ struct Palette *palette; /* current palette */
+ struct bGPDbrush *brush; /* current brush */
+ short bflag; /* previous brush flag */
+
+ int center[2]; /* mouse center position */
+ rcti rect; /* visible area */
+ rcti panel; /* panel area */
+ int row, col; /* number of rows and columns */
+ int boxsize[2]; /* size of each box color */
+
+ int totcolor; /* number of colors */
+ int curindex; /* index of color under cursor */
+ tGPDpickColor *colors; /* colors of palette */
+
+ void *draw_handle_3d; /* handle for drawing strokes while operator is running */
+} tGPDpick;
+
+
/* draw color name using default font */
static void gp_draw_color_name(tGPDpick *tgpk, tGPDpickColor *col, const uiFontStyle *fstyle, bool focus)
{
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index 02a279d5670..a908e8599fe 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -198,41 +198,6 @@ typedef struct tGPDfill {
} tGPDfill;
-/* Temporary color picker operation data */
-typedef struct tGPDpickColor {
- char name[64]; /* color name. Must be unique. */
- rcti full_rect; /* full size of region occupied by color box (for event/highlight handling) */
- rcti rect; /* box position */
- int index; /* index of color in palette */
- float rgba[4]; /* color */
- float fill[4]; /* fill color */
- bool fillmode; /* flag fill is not enabled */
-} tGPDpickColor;
-
-typedef struct tGPDpick {
- struct wmWindow *win; /* window */
- struct Scene *scene; /* current scene from context */
- struct ToolSettings *ts; /* current toolsettings from context */
- struct Object *ob; /* current active gp object */
- struct ScrArea *sa; /* area where painting originated */
- struct ARegion *ar; /* region where painting originated */
- struct Palette *palette; /* current palette */
- struct bGPDbrush *brush; /* current brush */
- short bflag; /* previous brush flag */
-
- int center[2]; /* mouse center position */
- rcti rect; /* visible area */
- rcti panel; /* panel area */
- int row, col; /* number of rows and columns */
- int boxsize[2]; /* size of each box color */
-
- int totcolor; /* number of colors */
- int curindex; /* index of color under cursor */
- tGPDpickColor *colors; /* colors of palette */
-
- void *draw_handle_3d; /* handle for drawing strokes while operator is running */
-} tGPDpick;
-
/* ***************************************************** */
/* Internal API */
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index a3fb091f16f..de1128c3ef2 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -68,7 +68,6 @@ struct tGPDdraw;
struct tGPDinterpolate;
struct tGPDprimitive;
struct tGPDfill;
-struct tGPDpick;
/* ------------- Grease-Pencil Runtime Data ---------------- */
More information about the Bf-blender-cvs
mailing list