Refactor: Sculpt: Avoid storing extra undo data on geometry_push #129828
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#129828
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Sean-Kim/blender:remove-extra-undo-data-geometry-push"
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?
Currently, Sculpt Mode's UndoStep stores two main categories of data,
the first category is valid for undo pushes where individual nodes of a
mesh are modified, the second category is when the entire mesh is
changed.
To avoid extra processing of data and move towards reducing and
simplifying the amount of data each of these types of undo operations
need, this commit strips down the data stored when a geometry_push step
is called.
Additionally, there are some areas in the code which called
BKE_sculpt_update_object_for_edit
as a requirement for the undo stepdata, these calls have been removed.
Testing:
I'm actually not sure why/how not storing data like
pivot_pos
and the active color attribute is correct for geometry/full undo steps. I wouldn't expect the requirements for those to be different TBH. In the future moving to behavior that mirrors object mode (push a separate undo step for these things) might make that possible, but right now I don't think so.Yeah, you're right. I'm actually not sure how this continues to work with this current commit, I suppose I didn't hit a case that would actually trigger any odd behavior?
Yeah the odd behavior would come from using undo/redo with the transform tools or after changing the active shape key. Splitting away the per node storage is nice, but generally I don't know what we gain by removing this small extra data from the geometry undo step.
@blender-bot build
@ -1726,3 +1726,3 @@
}
void push_begin_ex(const Scene & /*scene*/, Object &ob, const char *name)
static void save_attribute_data(Object &ob, SculptUndoStep *us)
maybe
save_extra_data
orsave_common_data
since this isn't just attributes?@blender-bot build