Sculpt: Add Line Trim tool #120845
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#120845
Loading…
Reference in New Issue
No description provided.
Delete Branch "Sean-Kim/blender:line-trim"
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 PR adds the Line Trim tool to Sculpt mode. It is exposed via the toolbar along with the other Trim tools and as an entry in the Sculpt menu.
Added Features
Technical Approach
Line gestures are represented as two points in screen space: the
start
andend
of the gesture. Trim tools work by taking a set of screen points as the top face of a volume, projecting a copy of the face into the scene and then using that as the operand shape for boolean operations. To behave as users would expect, the Line Trim tool does the following steps to make the initial face:Differences with Other Trim Tools
Alternatives
@blender-bot package
Package build started. Download here when ready.
I am not getting expected behaviour from this build. Using the line trim tool in sculpt mode gives me a cut line on parts of the mesh. Check the attached video
Very strange behavior... I'll take a second look at this, I didn't encounter this at all in my testing.
Ok, I've fixed the issue, I think I was invoking undefined behavior that just happened to be working on my laptop.
@ -281,3 +331,3 @@
ARegion *region = vc->region;
const Span<float2> screen_points = gesture_data.gesture_points;
std::array<float2, 4> line_points;
This handling of the
line_points
as looks rather awkward to me as it currently is, but I wasn't able to think of a good way of handling this. Another alternative here could be to modify the internalGestureData
blender::Array
in the aboveline_gesture_to_screen_points
but that also had a code smell. Any thoughts on a good approach here?I think this is fine. But another potentially simpler solution would be changing
const Span<float2> screen_points
toArray<float2>
. The copying shouldn't really matter here.@blender-bot package
Package build started. Download here when ready.
Works like a charm! Thank you for your effort 🥇