Commit: fcb0e8c75f265218fa9c1f767a8234aafd3842a4 Author: Antonioya Date: Tue Dec 11 18:05:29 2018 +0100 Branches: greasepencil-object https://developer.blender.org/rBfcb0e8c75f265218fa9c1f767a8234aafd3842a4
GP: Cleanup. Rename Beziers to Curve Beziers name can be misunderstood for users. Curve is more generic. =================================================================== M release/scripts/presets/keyconfig/keymap_data/blender_default.py M release/scripts/startup/bl_ui/properties_grease_pencil_common.py M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py M release/scripts/startup/bl_ui/space_topbar.py M source/blender/editors/gpencil/gpencil_intern.h M source/blender/editors/gpencil/gpencil_primitive.c =================================================================== diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 0ada09a9199..310dd4f0923 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -5707,13 +5707,13 @@ def km_3d_view_tool_gpencil_paint_arc(params): ]}, ) -def km_3d_view_tool_gpencil_paint_bezier(params): +def km_3d_view_tool_gpencil_paint_curve(params): return ( - "3D View Tool: Gpencil Paint, Bezier", + "3D View Tool: Gpencil Paint, Curve", {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, {"items": [ ("gpencil.primitive", {"type": params.tool_tweak, "value": 'ANY'}, - {"properties": [("type", 'BEZIER'), ("wait_for_input", False)]}), + {"properties": [("type", 'CURVE'), ("wait_for_input", False)]}), ]}, ) @@ -5990,7 +5990,7 @@ def generate_keymaps(params=None): km_3d_view_tool_gpencil_paint_box(params), km_3d_view_tool_gpencil_paint_circle(params), km_3d_view_tool_gpencil_paint_arc(params), - km_3d_view_tool_gpencil_paint_bezier(params), + km_3d_view_tool_gpencil_paint_curve(params), km_3d_view_tool_gpencil_edit_select(params), km_3d_view_tool_gpencil_edit_select_box(params), km_3d_view_tool_gpencil_edit_select_circle(params), diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index e21022345f7..2cb554c2c50 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -645,7 +645,7 @@ class GPENCIL_MT_gpencil_draw_specials(Menu): layout.operator("gpencil.primitive", text="Rectangle", icon='UV_FACESEL').type = 'BOX' layout.operator("gpencil.primitive", text="Circle", icon='ANTIALIASED').type = 'CIRCLE' layout.operator("gpencil.primitive", text="Arc", icon='SPHERECURVE').type = 'ARC' - layout.operator("gpencil.primitive", text="Bezier", icon='CURVE_BEZCURVE').type = 'BEZIER' + layout.operator("gpencil.primitive", text="Curve", icon='CURVE_BEZCURVE').type = 'CURVE' class GPENCIL_MT_gpencil_draw_delete(Menu): diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 6fdee5d18ff..fd36abab411 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1079,10 +1079,10 @@ class _defs_gpencil_paint: @ToolDef.from_fn - def bezier(): + def curve(): return dict( - text="Bezier", - icon="ops.gpencil.primitive_bezier", + text="Curve", + icon="ops.gpencil.primitive_curve", cursor='CROSSHAIR', widget=None, keymap=(), @@ -1594,7 +1594,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): _defs_gpencil_paint.box, _defs_gpencil_paint.circle, _defs_gpencil_paint.arc, - _defs_gpencil_paint.bezier, + _defs_gpencil_paint.curve, ], 'GPENCIL_EDIT': [ *_tools_gpencil_select, diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 7e21eff8dba..a8eaa3f3c34 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -301,7 +301,7 @@ class _draw_left_context_mode: return is_paint = True - if (tool.name in {"Line", "Box", "Circle", "Arc", "Bezier"}): + if (tool.name in {"Line", "Box", "Circle", "Arc", "Curve"}): is_paint = False elif (not tool.has_datablock): return @@ -375,7 +375,7 @@ class _draw_left_context_mode: draw_color_selector() - if tool.name in {"Arc", "Bezier", "Line"}: + if tool.name in {"Arc", "Curve", "Line"}: settings = context.tool_settings.gpencil_sculpt row = layout.row(align=True) row.prop(settings, "use_thickness_curve", text="", icon='CURVE_DATA') diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index 9e8660943d5..11fb4d4e5bd 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -382,7 +382,7 @@ enum { GP_STROKE_LINE = 1, GP_STROKE_CIRCLE = 2, GP_STROKE_ARC = 3, - GP_STROKE_BEZIER = 4 + GP_STROKE_CURVE = 4 }; diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 4cdad0b9c5e..30da695aca9 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -337,8 +337,8 @@ static void gpencil_primitive_status_indicators(bContext *C, tGPDprimitive *tgpi else if (tgpi->type == GP_STROKE_ARC) { BLI_strncpy(msg_str, IFACE_("Arc: ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/+- to adjust edge number, Shift to square, Alt to center, F to flip, C to Close"), UI_MAX_DRAW_STR); } - else if (tgpi->type == GP_STROKE_BEZIER) { - BLI_strncpy(msg_str, IFACE_("Bezier: ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/+- to adjust edge number, Shift to square, Alt to center, C to Close"), UI_MAX_DRAW_STR); + else if (tgpi->type == GP_STROKE_CURVE) { + BLI_strncpy(msg_str, IFACE_("Curve: ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/+- to adjust edge number, Shift to square, Alt to center, C to Close"), UI_MAX_DRAW_STR); } else { BLI_strncpy(msg_str, IFACE_("Circle: ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/+- to adjust edge number, Shift to square, Alt to center"), UI_MAX_DRAW_STR); @@ -595,13 +595,13 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) case GP_STROKE_ARC: gp_primitive_arc(tgpi, points2D); break; - case GP_STROKE_BEZIER: + case GP_STROKE_CURVE: gp_primitive_bezier(tgpi, points2D); default: break; } - if (ELEM(tgpi->type, GP_STROKE_ARC, GP_STROKE_BEZIER)) { + if (ELEM(tgpi->type, GP_STROKE_ARC, GP_STROKE_CURVE)) { if (tgpi->cyclic) gps->flag |= GP_STROKE_CYCLIC; else @@ -714,7 +714,7 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) } } /* normalize value to evaluate curve */ - if (ELEM(tgpi->type, GP_STROKE_ARC, GP_STROKE_BEZIER, GP_STROKE_LINE)) { + if (ELEM(tgpi->type, GP_STROKE_ARC, GP_STROKE_CURVE, GP_STROKE_LINE)) { if (gset->flag & GP_SCULPT_SETT_FLAG_PRIMITIVE_CURVE) { float value = (float)i / (gps->totpoints - 1); float curvef = curvemapping_evaluateF(gset->cur_primitive, 0, value); @@ -907,7 +907,7 @@ static void gpencil_primitive_init(bContext *C, wmOperator *op) /* set parameters */ tgpi->type = RNA_enum_get(op->ptr, "type"); - if(ELEM(tgpi->type, GP_STROKE_ARC, GP_STROKE_BEZIER)) + if(ELEM(tgpi->type, GP_STROKE_ARC, GP_STROKE_CURVE)) tgpi->curve = true; else tgpi->curve = false; @@ -1232,7 +1232,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e copy_v2fl_v2i(tgpi->mval, event->mval); /* bezier event handling */ - if (tgpi->type == GP_STROKE_BEZIER) + if (tgpi->type == GP_STROKE_CURVE) gpencil_primitive_bezier_event_handling(C, op, win, event, tgpi); else if (tgpi->type == GP_STROKE_ARC) gpencil_primitive_arc_event_handling(C, op, win, event, tgpi); @@ -1246,7 +1246,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e tgpi->flag = IN_PROGRESS; gpencil_primitive_interaction_begin(tgpi, event); } - else if ((event->val == KM_RELEASE) && (tgpi->flag == IN_PROGRESS) && (tgpi->type != GP_STROKE_BEZIER)) { + else if ((event->val == KM_RELEASE) && (tgpi->flag == IN_PROGRESS) && (tgpi->type != GP_STROKE_CURVE)) { /* stop drawing primitive */ tgpi->flag = IDLE; gpencil_primitive_interaction_end(C, op, win, tgpi); @@ -1421,7 +1421,7 @@ void GPENCIL_OT_primitive(wmOperatorType *ot) {GP_STROKE_LINE, "LINE", 0, "Line", ""}, {GP_STROKE_CIRCLE, "CIRCLE", 0, "Circle", ""}, {GP_STROKE_ARC, "ARC", 0, "Arc", ""}, - {GP_STROKE_BEZIER, "BEZIER", 0, "Bezier", ""}, + {GP_STROKE_CURVE, "CURVE", 0, "Curve", ""}, {0, NULL, 0, NULL, NULL} }; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs