GPv3: Convert selection domain on curves when selection mode changes
When the selection mode in the Grease Pencil tool settings changes, the selection domain of all curves in the active Grease Pencil object has to change. This PR handles that conversion. Point selections are converted to curve selection and vice versa. Note: this PR only takes care of selection modes 'Point' and 'Stroke'. 'Segment' mode is handled in a separate PR (#109221). Pull Request: https://projects.blender.org/blender/blender/pulls/109964
This commit is contained in:
committed by
Falk David
parent
ac3f4e959f
commit
64887c80a2
@@ -752,8 +752,18 @@ class VIEW3D_HT_header(Header):
|
||||
# Select mode for Editing
|
||||
if object_mode == 'EDIT':
|
||||
row = layout.row(align=True)
|
||||
row.prop_enum(tool_settings, "gpencil_selectmode_edit", text="", value='POINT')
|
||||
row.prop_enum(tool_settings, "gpencil_selectmode_edit", text="", value='STROKE')
|
||||
row.operator(
|
||||
"grease_pencil.set_selection_mode",
|
||||
text="",
|
||||
icon="GP_SELECT_POINTS",
|
||||
depress=(tool_settings.gpencil_selectmode_edit == 'POINT'),
|
||||
).mode = 'POINT'
|
||||
row.operator(
|
||||
"grease_pencil.set_selection_mode",
|
||||
text="",
|
||||
icon="GP_SELECT_STROKES",
|
||||
depress=(tool_settings.gpencil_selectmode_edit == 'STROKE'),
|
||||
).mode = 'STROKE'
|
||||
|
||||
# Grease Pencil (legacy)
|
||||
if obj and obj.type == 'GPENCIL' and context.gpencil_data:
|
||||
|
||||
Reference in New Issue
Block a user