Sculpt: Add customizable increment for line tool snapping #121547
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#121547
Loading…
Reference in New Issue
No description provided.
Delete Branch "Sean-Kim/blender:line-angle"
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 exposes the snap increments introduced in #118760 to the base
WM_gesture_straightline
operators and exposes the increment menu to allow users to change this value in both Sculpt and Weight Paint mode.Details
The full list of operators this affects:
Compatibility
Previously, the hardcoded value for this snap increment was 15 degrees, by using the toolsetting value, this changes to 5 degrees.
Is that working for all line tools?
Nice! @HooglyBoogly can you make a @blender-bot package so I can review?
@blender-bot package
Package build started. Download here when ready.
How about putting this popover in the tool settings header so that it only shows up when there is a tool that uses the settings? I'm not sure about having the popover button clutter the UI in sculpt mode when it rarely has an effect.
@nickberckley - Yes, the full list of tools that this would apply to is:
Though this comment reminds me that I should check the other modes to ensure that the popover is visible.
@HooglyBoogly - I put it in the header initially to have it in a consistent spot with the other modes. I can move it to the tool settings header for sculpt though.
@blender-bot package
Package build started. Download here when ready.
can we have a pic of where this setting is located now?
@ThinkingPolygons - Updated the main post with an example from Line Mask. Alternatively, if you want to see it for each tool that was changed, a build is available to download.
thank you
tested it a little bit, and it works fine. very useful feature 👍
but i think where it was made more sense. i mean, this is a global setting, not a per tool setting.
When you change it, it changes everywhere, and vice versa. when you change it in object mode, it also changes. so the ui should remain consistent imo
I think the fact that it's a global setting is an important consideration as well. Thanks for the thoughts. I don't want to do too much back and forth on this, so I'll wait for more feedback from other module members before making any further changes to the icon location.
This works as expected. I don't see any issue with the rotation snapping setting to be in the snapping settings for bisect (bpy.ops.wm.call_panel(name="VIEW3D_PT_snapping"))
Approving the pull request. Thank you :-)
Uploading the two different options for where the header could be (mentioned in the UI module chat)
Just an update here from the module meeting - planning on going with the global header option right now to make it the most consistent with other modes so that it's more consistent with other modes.
The consensus was in the sculpt module meeting today that this popover should go in the non-tool header next to the automasking popover, mainly for consistency with other global options.
@ -995,3 +1014,1 @@
const float angle_snapped_deg = -floorf(angle_deg / STRAIGHTLINE_SNAP_DEG) *
STRAIGHTLINE_SNAP_DEG;
const float angle_snapped = DEG2RAD(angle_snapped_deg);
const float angle_deg = angle + (snap_angle / 2.0f);
I think the snapping still has to happen in degrees, right? (A
RAD2DEG
missing here)Oh, ugh, moving too fast. I think the names just need to be updated here.
The previous code was going from
angle
- radiansangle_deg
- degreesangle_snapped_deg
- degreesangle_snapped
- radiansIs it not important that
floorf
is called on degrees rather than radians? Maybe I'm missing something but floor from 1.4 to 1.0 won't be meaningful for radians, right?Discussed offline - for future reference the
floorf
is calculating a integer number of rotations to do.