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:
authorCampbell Barton <ideasman42@gmail.com>2017-10-18 09:09:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-18 09:09:41 +0300
commitec2bbc90e7c6a7f21da253333a14d49ef1428319 (patch)
tree0ee36fb8e39593f29197d5fae17b885cc1a700e1 /source/blender/editors/gpencil
parent54f9a6e5da06e671f7640c9ec3ac3c305644beb6 (diff)
parentab7ebf2b10f67b002447fb0e2cb352c2c178e128 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_convert.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c10
-rw-r--r--source/blender/editors/gpencil/gpencil_intern.h18
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c10
7 files changed, 33 insertions, 25 deletions
diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c
index a4e5a908531..5d014b5d49e 100644
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@ -109,20 +109,20 @@ enum {
};
/* RNA enum define */
-static EnumPropertyItem prop_gpencil_convertmodes[] = {
+static const EnumPropertyItem prop_gpencil_convertmodes[] = {
{GP_STROKECONVERT_PATH, "PATH", ICON_CURVE_PATH, "Path", "Animation path"},
{GP_STROKECONVERT_CURVE, "CURVE", ICON_CURVE_BEZCURVE, "Bezier Curve", "Smooth Bezier curve"},
{GP_STROKECONVERT_POLY, "POLY", ICON_MESH_DATA, "Polygon Curve", "Bezier curve with straight-line segments (vector handles)"},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem prop_gpencil_convert_timingmodes_restricted[] = {
+static const EnumPropertyItem prop_gpencil_convert_timingmodes_restricted[] = {
{GP_STROKECONVERT_TIMING_NONE, "NONE", 0, "No Timing", "Ignore timing"},
{GP_STROKECONVERT_TIMING_LINEAR, "LINEAR", 0, "Linear", "Simple linear timing"},
{0, NULL, 0, NULL, NULL},
};
-static EnumPropertyItem prop_gpencil_convert_timingmodes[] = {
+static const EnumPropertyItem prop_gpencil_convert_timingmodes[] = {
{GP_STROKECONVERT_TIMING_NONE, "NONE", 0, "No Timing", "Ignore timing"},
{GP_STROKECONVERT_TIMING_LINEAR, "LINEAR", 0, "Linear", "Simple linear timing"},
{GP_STROKECONVERT_TIMING_FULL, "FULL", 0, "Original", "Use the original timing, gaps included"},
@@ -131,7 +131,7 @@ static EnumPropertyItem prop_gpencil_convert_timingmodes[] = {
{0, NULL, 0, NULL, NULL},
};
-static EnumPropertyItem *rna_GPConvert_mode_items(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop),
+static const EnumPropertyItem *rna_GPConvert_mode_items(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop),
bool *UNUSED(r_free))
{
if (RNA_boolean_get(ptr, "use_timing_data")) {
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 6980ad46241..93c9d21e717 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -302,7 +302,7 @@ static int gp_layer_move_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_layer_move(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{GP_LAYER_MOVE_UP, "UP", 0, "Up", ""},
{GP_LAYER_MOVE_DOWN, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
@@ -831,7 +831,7 @@ static int gp_stroke_arrange_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_stroke_arrange(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{GP_STROKE_MOVE_UP, "UP", 0, "Bring Forward", ""},
{GP_STROKE_MOVE_DOWN, "DOWN", 0, "Send Backward", ""},
{GP_STROKE_MOVE_TOP, "TOP", 0, "Bring to Front", ""},
@@ -1165,7 +1165,7 @@ static int gp_brush_move_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_brush_move(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{GP_BRUSH_MOVE_UP, "UP", 0, "Up", ""},
{GP_BRUSH_MOVE_DOWN, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL }
@@ -1922,7 +1922,7 @@ static int gp_palettecolor_move_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_palettecolor_move(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{GP_COLOR_MOVE_UP, "UP", 0, "Up", ""},
{GP_COLOR_MOVE_DOWN, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 4cd628b7fd3..a82148788c8 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -653,7 +653,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_paste(wmOperatorType *ot)
{
- static EnumPropertyItem copy_type[] = {
+ static const EnumPropertyItem copy_type[] = {
{GP_COPY_ONLY, "COPY", 0, "Copy", ""},
{GP_COPY_MERGE, "MERGE", 0, "Merge", ""},
{0, NULL, 0, NULL, NULL}
@@ -1318,7 +1318,7 @@ static int gp_delete_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_delete(wmOperatorType *ot)
{
- static EnumPropertyItem prop_gpencil_delete_types[] = {
+ static const EnumPropertyItem prop_gpencil_delete_types[] = {
{GP_DELETEOP_POINTS, "POINTS", 0, "Points", "Delete selected points and split strokes into segments"},
{GP_DELETEOP_STROKES, "STROKES", 0, "Strokes", "Delete selected strokes"},
{GP_DELETEOP_FRAME, "FRAME", 0, "Frame", "Delete active frame"},
@@ -1738,7 +1738,7 @@ static int gp_stroke_cyclical_set_exec(bContext *C, wmOperator *op)
*/
void GPENCIL_OT_stroke_cyclical_set(wmOperatorType *ot)
{
- static EnumPropertyItem cyclic_type[] = {
+ static const EnumPropertyItem cyclic_type[] = {
{GP_STROKE_CYCLIC_CLOSE, "CLOSE", 0, "Close all", ""},
{GP_STROKE_CYCLIC_OPEN, "OPEN", 0, "Open all", ""},
{GP_STROKE_CYCLIC_TOGGLE, "TOGGLE", 0, "Toggle", ""},
@@ -2000,7 +2000,7 @@ static int gp_stroke_join_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_stroke_join(wmOperatorType *ot)
{
- static EnumPropertyItem join_type[] = {
+ static const EnumPropertyItem join_type[] = {
{GP_STROKE_JOIN, "JOIN", 0, "Join", ""},
{GP_STROKE_JOINCOPY, "JOINCOPY", 0, "Join and Copy", ""},
{0, NULL, 0, NULL, NULL}
@@ -2190,7 +2190,7 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_reproject(wmOperatorType *ot)
{
- static EnumPropertyItem reproject_type[] = {
+ static const EnumPropertyItem reproject_type[] = {
{GP_REPROJECT_PLANAR, "PLANAR", 0, "Planar",
"Reproject the strokes to end up on the same plane, as if drawn from the current viewpoint "
"using 'Cursor' Stroke Placement"},
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index a3734c56c59..04bcea02c9b 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -121,16 +121,22 @@ void gp_randomize_stroke(bGPDstroke *gps, bGPDbrush *brush);
/* Layers Enums -------------------------------------- */
-struct EnumPropertyItem *ED_gpencil_layers_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-struct EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const struct EnumPropertyItem *ED_gpencil_layers_enum_itemf(
+ struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop,
+ bool *r_free);
+const struct EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(
+ struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop,
+ bool *r_free);
/* Enums of GP Brushes */
-EnumPropertyItem *ED_gpencil_brushes_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
- bool *r_free);
+const EnumPropertyItem *ED_gpencil_brushes_enum_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
+ bool *r_free);
/* Enums of GP palettes */
-EnumPropertyItem *ED_gpencil_palettes_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
- bool *r_free);
+const EnumPropertyItem *ED_gpencil_palettes_enum_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
+ bool *r_free);
/* ***************************************************** */
/* Operator Defines */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index fcca0a38c3f..0b4bdb9914d 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2758,7 +2758,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* ------------------------------- */
-static EnumPropertyItem prop_gpencil_drawmodes[] = {
+static const EnumPropertyItem prop_gpencil_drawmodes[] = {
{GP_PAINTMODE_DRAW, "DRAW", 0, "Draw Freehand", "Draw freehand stroke(s)"},
{GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, "Draw Straight Lines", "Draw straight line segment(s)"},
{GP_PAINTMODE_DRAW_POLY, "DRAW_POLY", 0, "Draw Poly Line", "Click to place endpoints of straight line segments (connected)"},
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index 3d9689ab54f..07abab8af2e 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -371,7 +371,7 @@ static int gpencil_select_grouped_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_select_grouped(wmOperatorType *ot)
{
- static EnumPropertyItem prop_select_grouped_types[] = {
+ static const EnumPropertyItem prop_select_grouped_types[] = {
{GP_SEL_SAME_LAYER, "LAYER", 0, "Layer", "Shared layers"},
{GP_SEL_SAME_COLOR, "COLOR", 0, "Color", "Shared colors"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index fae08bd771e..4023a343b22 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -309,7 +309,8 @@ int gp_active_palettecolor_poll(bContext *C)
/* NOTE: These include an option to create a new layer and use that... */
/* Just existing layers */
-EnumPropertyItem *ED_gpencil_layers_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *ED_gpencil_layers_enum_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
bGPdata *gpd = CTX_data_gpencil_data(C);
bGPDlayer *gpl;
@@ -342,7 +343,8 @@ EnumPropertyItem *ED_gpencil_layers_enum_itemf(bContext *C, PointerRNA *UNUSED(p
}
/* Existing + Option to add/use new layer */
-EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
bGPdata *gpd = CTX_data_gpencil_data(C);
bGPDlayer *gpl;
@@ -1104,7 +1106,7 @@ bool ED_gpencil_stroke_minmax(
}
/* Dynamic Enums of GP Brushes */
-EnumPropertyItem *ED_gpencil_brushes_enum_itemf(
+const EnumPropertyItem *ED_gpencil_brushes_enum_itemf(
bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
bool *r_free)
{
@@ -1139,7 +1141,7 @@ EnumPropertyItem *ED_gpencil_brushes_enum_itemf(
}
/* Dynamic Enums of GP Palettes */
-EnumPropertyItem *ED_gpencil_palettes_enum_itemf(
+const EnumPropertyItem *ED_gpencil_palettes_enum_itemf(
bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
bool *r_free)
{