GPv3: domain support for selection operators (domains point and stroke) #108970
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#108970
Loading…
Reference in New Issue
No description provided.
Delete Branch "SietseB/blender:gp3-select-modes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This patch adds support for two of the three selection domains in the Edit Mode tool settings: point and stroke.
Affected selection operators: select all, lasso select, select pick, box select.
@ -144,0 +152,4 @@
case GP_SELECTMODE_STROKE:
return ATTR_DOMAIN_CURVE;
break;
case GP_SELECTMODE_SEGMENT:
Hmm, currently I don't think there will ever be a "Segment" domain on curves.
@ -3204,3 +3227,3 @@
});
std::atomic<bool> deselected = false;
bool deselected = false;
Removing
atomic
here seems unrelated, better to not do it now.You're fast, @HooglyBoogly! Thanks for the review. I've removed the 'segment' parts for now. Enough other fish to fry first.
Thank you! This looks sensible to me, but since a few other non-interactive selection operators already landed in
main
, I think they should already be supported in this patch.I skipped the operators that only work on the
point
domain:They don't work on entire strokes.
Perhaps I should add an additional
poll
method for these operators, being disabled when in stroke selection mode?@SietseB Right, their poll method should fail in case the selection mode is 'stroke'. That will also mean the operators are grayed out in this case.
I've added the
poll
method.Some small remaining comments.
@ -42,17 +43,28 @@ bool editable_grease_pencil_poll(bContext *C)
return true;
}
bool selection_domain_is_point_poll(bContext *C)
selection_domain_is_point_poll
->editable_grease_pencil_point_selection_poll
@ -144,0 +153,4 @@
return ATTR_DOMAIN_CURVE;
break;
default:
BLI_assert_unreachable();
I would add a
case GP_SELECTMODE_SEGMENT: return ATTR_DOMAIN_POINT
and remove thedefault
case + theBLI_assert_unreachable();
One last comment that I forgot last time.
@ -42,17 +43,28 @@ bool editable_grease_pencil_poll(bContext *C)
return true;
}
bool editable_grease_pencil_point_selection_poll(bContext *C)
This should be declared in
ED_grease_pencil.h
likeeditable_grease_pencil_poll
.