sculpt mode | lose pivot position data #120864

Open
opened 2024-04-20 22:10:16 +02:00 by CODACOD · 7 comments

blender ver 4.1.1
while switching between undo\redo blender lose pivot position data and reset it to the original position. and everytime doing this i have to set back the pivot position and that registered as undo\redo steps.


beside that i hope there is an option for setting the pivot inside the object . same like set the origin to geometry. this is gonna be useful for posing . and rather than go to object mode and set origin to geometry we can do that in sculpt mode 😃


@farsthary @Sergey, @HooglyBoogly, @ideasman42, @Jeroen-Bakker, @mont29

blender ver 4.1.1 while switching between undo\redo blender lose pivot position data and reset it to the original position. and everytime doing this i have to set back the pivot position and that registered as undo\redo steps. ------ beside that i hope there is an option for setting the pivot inside the object . same like set the origin to geometry. this is gonna be useful for posing . and rather than go to object mode and set origin to geometry we can do that in sculpt mode 😃 ---- @farsthary @Sergey, @HooglyBoogly, @ideasman42, @Jeroen-Bakker, @mont29
CODACOD added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2024-04-20 22:10:17 +02:00

I don't know if this is pivot point (as in operator settings) or 3d cursor (as it looks like and called in status bar). And depend on that fact what is that this can be correct bug or expected behavior.

I don't know if this is pivot point (as in operator settings) or 3d cursor (as it looks like and called in status bar). And depend on that fact what is that this can be correct bug or expected behavior.
Author

I don't know if this is pivot point (as in operator settings) or 3d cursor (as it looks like and called in status bar). And depend on that fact what is that this can be correct bug or expected behavior.

when dev added shift+rightclick to set pivot in sculpt mode its comes with this problem . so i think its not expected behavior but should be corrected .

> I don't know if this is pivot point (as in operator settings) or 3d cursor (as it looks like and called in status bar). And depend on that fact what is that this can be correct bug or expected behavior. when dev added `shift+rightclick` to set pivot in sculpt mode its comes with this problem . so i think its not expected behavior but should be corrected .

@CODACOD what was the last Blender version that worked?

@CODACOD what was the last Blender version that worked?
Author

@CODACOD what was the last Blender version that worked?

this feature first added to blender 4.0 (i tried 3.6.9 and it was`nt there) and it have this problem ever since .

> @CODACOD what was the last Blender version that worked? this feature first added to blender 4.0 (i tried 3.6.9 and it was`nt there) and it have this problem ever since .

This is an oversight from the initial implementation. The SculptSession's pivot_point is only pushed to the undo stack with an actual geometry change with sculpt brushes. The Set Pivot Position operator does not invoke a code path which would put the pivot point to the undo stack.

@ideasman42 What I am not sure is what undo stack the OPTYPE_UNDO uses. Either I am missing something, or sculpt_undosys_step_encode is not called when the operator is called. Other than that it sounds like it shouldn't be that hard to fix this issue.

This is an oversight from the initial implementation. The `SculptSession`'s `pivot_point` is only pushed to the undo stack with an actual geometry change with sculpt brushes. The `Set Pivot Position` operator does not invoke a code path which would put the pivot point to the undo stack. @ideasman42 What I am not sure is what undo stack the `OPTYPE_UNDO` uses. Either I am missing something, or `sculpt_undosys_step_encode` is not called when the operator is called. Other than that it sounds like it shouldn't be that hard to fix this issue.

This is an oversight from the initial implementation. The SculptSession's pivot_point is only pushed to the undo stack with an actual geometry change with sculpt brushes. The Set Pivot Position operator does not invoke a code path which would put the pivot point to the undo stack.

@ideasman42 What I am not sure is what undo stack the OPTYPE_UNDO uses. Either I am missing something, or sculpt_undosys_step_encode is not called when the operator is called. Other than that it sounds like it shouldn't be that hard to fix this issue.

The SCULPT_OT_set_pivot_position operator falls back to "Global Undo", however the global undo steps are not restored since the pivot position isn't written to the blend-file. It looks like this whole area needs some work as it doesn't seem undo was considered when adding the functionality.

If we want this to work reliably it should probably be made part of the blend file. However a more isolated fix can probably be made which resolves the bug reported here.

> This is an oversight from the initial implementation. The `SculptSession`'s `pivot_point` is only pushed to the undo stack with an actual geometry change with sculpt brushes. The `Set Pivot Position` operator does not invoke a code path which would put the pivot point to the undo stack. > > @ideasman42 What I am not sure is what undo stack the `OPTYPE_UNDO` uses. Either I am missing something, or `sculpt_undosys_step_encode` is not called when the operator is called. Other than that it sounds like it shouldn't be that hard to fix this issue. The `SCULPT_OT_set_pivot_position` operator falls back to "Global Undo", however the global undo steps are not restored since the pivot position isn't written to the blend-file. It looks like this whole area needs some work as it doesn't seem undo was considered when adding the functionality. If we want this to work reliably it should probably be made part of the blend file. However a more isolated fix can probably be made which resolves the bug reported here.

If we want this to work reliably it should probably be made part of the blend file.

I am not sure you can undo global-undo step while in sculpt mode? Not currently, anyway, and supporting it might be quite a challenge.

However a more isolated fix can probably be made which resolves the bug reported here.

The operator can skip OPTYPE_UNDO, and take care of sculpt-mode-specific push manually.

> If we want this to work reliably it should probably be made part of the blend file. I am not sure you can undo global-undo step while in sculpt mode? Not currently, anyway, and supporting it might be quite a challenge. > However a more isolated fix can probably be made which resolves the bug reported here. The operator can skip `OPTYPE_UNDO`, and take care of sculpt-mode-specific push manually.
Sign in to join this conversation.
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
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#120864
No description provided.