GP: Draw Mode: Add Arc Primitive

This adds an elliptical arc primitive.
Press CKEY for toggling closed/open arc.
Press FKEY key for flipping arc.

Additional changes to gpencil primitives.
Increases default edges of circle to 64.
Keymap changes to allow primitives to be drawn with Shift or Alt key.
Allow Plus/Minus key to adjust number of edges.

Missing: Toolbar icon

Differential Revision: https://developer.blender.org/D4024
This commit is contained in:
Charlie Jolly
2018-12-03 14:55:57 +00:00
parent f0432e37ab
commit 2c19c9b2f6
6 changed files with 119 additions and 13 deletions

View File

@@ -1067,6 +1067,15 @@ class _defs_gpencil_paint:
keymap=(),
)
@ToolDef.from_fn
def arc():
return dict(
text="Arc",
icon="ops.gpencil.primitive_arc",
cursor='CROSSHAIR',
widget=None,
keymap=(),
)
class _defs_gpencil_edit:
@ToolDef.from_fn
@@ -1573,6 +1582,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
_defs_gpencil_paint.line,
_defs_gpencil_paint.box,
_defs_gpencil_paint.circle,
_defs_gpencil_paint.arc,
],
'GPENCIL_EDIT': [
*_tools_gpencil_select,