Adjust Last Operation: Other changes outside that panel are reverted back automatically #78171

Open
opened 2020-06-23 19:35:39 +02:00 by Vyacheslav Kobozev · 35 comments

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.87

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-22 22:06, hash: 51bf04383a
Worked: (newest version of Blender that worked as expected)

Short description of error
Here the demo and file
2020-06-23_20-30-11.mp4
Scene state reset.blend

Exact steps for others to reproduce the error

  1. Add some objects, add last one
  2. Change visibility for other objects via outliner
  3. Change property in adjustment popup
  4. Scene settings resetted to previous
**System Information** Operating system: Windows-7-6.1.7601-SP1 64 Bits Graphics card: GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.87 **Blender Version** Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-22 22:06, hash: `51bf04383a` Worked: (newest version of Blender that worked as expected) **Short description of error** Here the demo and file [2020-06-23_20-30-11.mp4](https://archive.blender.org/developer/F8639389/2020-06-23_20-30-11.mp4) [Scene state reset.blend](https://archive.blender.org/developer/F8639397/Scene_state_reset.blend) **Exact steps for others to reproduce the error** 1. Add some objects, add last one 2. Change visibility for other objects via outliner 3. Change property in adjustment popup 4. Scene settings resetted to previous

Added subscriber: @Vyach

Added subscriber: @Vyach

#103647 was marked as duplicate of this issue

#103647 was marked as duplicate of this issue

#102239 was marked as duplicate of this issue

#102239 was marked as duplicate of this issue

#96006 was marked as duplicate of this issue

#96006 was marked as duplicate of this issue

#91038 was marked as duplicate of this issue

#91038 was marked as duplicate of this issue

#92398 was marked as duplicate of this issue

#92398 was marked as duplicate of this issue

#89460 was marked as duplicate of this issue

#89460 was marked as duplicate of this issue

#88642 was marked as duplicate of this issue

#88642 was marked as duplicate of this issue

#88224 was marked as duplicate of this issue

#88224 was marked as duplicate of this issue

#85705 was marked as duplicate of this issue

#85705 was marked as duplicate of this issue

#81370 was marked as duplicate of this issue

#81370 was marked as duplicate of this issue

#80615 was marked as duplicate of this issue

#80615 was marked as duplicate of this issue

#58839 was marked as duplicate of this issue

#58839 was marked as duplicate of this issue

#63915 was marked as duplicate of this issue

#63915 was marked as duplicate of this issue
Vyacheslav Kobozev changed title from Scene state reset during changing property for new object to Scene`s state resets during changing property for new object 2020-06-23 21:35:32 +02:00
Member
Added subscribers: @WilliamReynish, @JulianEisel, @ideasman42, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

I think this is a general issue with Redo/Adjust Last Operation (but this could very well be a design limitation atm):

A similar issue also came up in #73302, see, my reply there #73302#856078

The Adjust Last Operation panel stays as long as you dont execute another operator. Change visibility for other objects via outliner [or basically any setting in the property editor] is not an operator (if it was another operator, the panel would close), so this panel stays open. Doing adjustments in this panel then will hop back in the undo stack, so changes done to settings after the operator execution get wiped again.
Not sure if this can easily be done, but I would propose to just close the Adjust Last Operation panel upon unrelated [non-operator] property changes, which should get rid of this confusion.

I assume this is not a bug, but maybe something the User Interface team can comment upon [or close if this is not considered to be changed anytime soon]?
Will update the tilte to reflect my findings.

CC @JulianEisel
CC @ideasman42
CC @WilliamReynish

I think this is a general issue with Redo/Adjust Last Operation (but this could very well be a design limitation atm): A similar issue also came up in #73302, see, my reply there #73302#856078 The Adjust Last Operation panel stays as long as you dont execute another **operator**. Change visibility for other objects via outliner [or basically any setting in the property editor] is not an **operator** (if it was another **operator**, the panel would close), so this panel stays open. Doing adjustments in this panel then will hop back in the undo stack, so changes done to settings after the operator execution get wiped again. Not sure if this can easily be done, but I would propose to just close the Adjust Last Operation panel upon unrelated [non-operator] property changes, which should get rid of this confusion. I *assume* this is not a bug, but maybe something the User Interface team can comment upon [or close if this is not considered to be changed anytime soon]? Will update the tilte to reflect my findings. CC @JulianEisel CC @ideasman42 CC @WilliamReynish
Philipp Oeser changed title from Scene`s state resets during changing property for new object to Operator Redo/Adjust Last Operation: panel stays open, changes to unrelated properties (done after operator execution) will get undone when changing properties in the panel again 2020-06-24 11:40:26 +02:00
Member

This is indeed a design limitation/issue, not a bug.

We could clear the undo registry when doing the undo push for a button, removing the panel:

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 3f3f0513184..305bcd1eb0f 100644
    - a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -946,6 +946,7 @@ static void ui_apply_but_funcs_after(bContext *C)

ui_afterfunc_update_preferences_dirty(&after);

 

if (after.undostr[0]) {

+      WM_operator_stack_clear(CTX_wm_manager(C));
 ED_undo_push(C, after.undostr);

}
}

diff --git a/source/blender/editors/interface/interface_region_hud.c b/source/blender/editors/interface/interface_region_hud.c
index 1f8af7b9e6e..c02047fef94 100644
    - a/source/blender/editors/interface/interface_region_hud.c
+++ b/source/blender/editors/interface/interface_region_hud.c
@@ -231,11 +231,27 @@ static void hud_region_draw(const bContext *C, ARegion *region)

}

 }
 
+static void hud_region_listener(wmWindow *UNUSED(win),
+                                ScrArea *UNUSED(area),
+                                ARegion *region,
+                                wmNotifier *wmn,
+                                const Scene *UNUSED(scene))
+{
+  switch (wmn->category) {
+    case NC_WM:
+      if (wmn->data == ND_HISTORY) {
+        ED_region_tag_redraw(region);
+      }
+      break;
+  }
+}
+
 ARegionType *ED_area_type_hud(int space_type)
 {

ARegionType *art = MEM_callocN(sizeof(ARegionType), func);
art->regionid = RGN_TYPE_HUD;
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D;

+  art->listener = hud_region_listener;

art->layout = hud_region_layout;
art->draw = hud_region_draw;
art->init = hud_region_init;


This is quite a design change though, not sure if it's a good idea.

This is indeed a design limitation/issue, not a bug. We *could* clear the undo registry when doing the undo push for a button, removing the panel: ``` lines=10 diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 3f3f0513184..305bcd1eb0f 100644 - a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -946,6 +946,7 @@ static void ui_apply_but_funcs_after(bContext *C) ``` ui_afterfunc_update_preferences_dirty(&after); ``` ``` if (after.undostr[0]) { ``` + WM_operator_stack_clear(CTX_wm_manager(C)); ``` ED_undo_push(C, after.undostr); } } ``` diff --git a/source/blender/editors/interface/interface_region_hud.c b/source/blender/editors/interface/interface_region_hud.c index 1f8af7b9e6e..c02047fef94 100644 - a/source/blender/editors/interface/interface_region_hud.c +++ b/source/blender/editors/interface/interface_region_hud.c @@ -231,11 +231,27 @@ static void hud_region_draw(const bContext *C, ARegion *region) ``` } ``` } +static void hud_region_listener(wmWindow *UNUSED(win), + ScrArea *UNUSED(area), + ARegion *region, + wmNotifier *wmn, + const Scene *UNUSED(scene)) +{ + switch (wmn->category) { + case NC_WM: + if (wmn->data == ND_HISTORY) { + ED_region_tag_redraw(region); + } + break; + } +} + ARegionType *ED_area_type_hud(int space_type) { ``` ARegionType *art = MEM_callocN(sizeof(ARegionType), __func__); art->regionid = RGN_TYPE_HUD; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D; ``` + art->listener = hud_region_listener; ``` art->layout = hud_region_layout; art->draw = hud_region_draw; art->init = hud_region_init; ``` ``` This is quite a design change though, not sure if it's a good idea.
Member

Added subscribers: @gadic, @demmordor, @iss, @SonicBlue, @ZedDB

Added subscribers: @gadic, @demmordor, @iss, @SonicBlue, @ZedDB
Julian Eisel changed title from Operator Redo/Adjust Last Operation: panel stays open, changes to unrelated properties (done after operator execution) will get undone when changing properties in the panel again to Adjust Last Operation: Changes in Outliner are reverted back automatically 2020-06-26 18:48:16 +02:00
Member

Added subscriber: @user1

Added subscriber: @user1
Philipp Oeser changed title from Adjust Last Operation: Changes in Outliner are reverted back automatically to Adjust Last Operation: Other changes outside that panel are reverted back automatically 2020-09-11 18:21:50 +02:00
Member

Added subscriber: @3di

Added subscriber: @3di

Added subscriber: @LostSense

Added subscriber: @LostSense

Added subscriber: @JerBot

Added subscriber: @JerBot
Member

Added subscriber: @Benni334

Added subscriber: @Benni334

Added subscriber: @SergeyIvanov

Added subscriber: @SergeyIvanov
Member

To be clear what I explained above would mean that after changing the object visibility, or any other (non-UI) setting, the Adjust Last Operation panel would disappear.

So it makes something impossible that was sort of possible before (editing operator properties after changing object visibility, or render settings or such), but it would behave unexpected and apparently broken. Users may not even notice that their changes were undone. I find that quite bad.

So maybe we should do what I suggested for 3.0. Curious what others think, e.g. what do you think @ideasman42?

To be clear what I explained above would mean that after changing the object visibility, or any other (non-UI) setting, the *Adjust Last Operation* panel would disappear. So it makes something impossible that was sort of possible before (editing operator properties after changing object visibility, or render settings or such), but it would behave unexpected and apparently broken. Users may not even notice that their changes were undone. I find that quite bad. So maybe we should do what I suggested for 3.0. Curious what others think, e.g. what do you think @ideasman42?
Member

Added subscriber: @ephraimpauli

Added subscriber: @ephraimpauli
Member

Added subscriber: @Geposs

Added subscriber: @Geposs

Added subscribers: @XDroid-3, @mano-wii, @PratikPB2123

Added subscribers: @XDroid-3, @mano-wii, @PratikPB2123
Member

Added subscriber: @blenderrocket

Added subscriber: @blenderrocket
Member

This looks identical to #96006 (The Replacement of Outliner Histories on use of Redo panel)
Can me merge these reports in either way?

This looks identical to #96006 (The Replacement of Outliner Histories on use of Redo panel) Can me merge these reports in either way?
Member

In #78171#1440351, @PratikPB2123 wrote:
This looks identical to #96006 (The Replacement of Outliner Histories on use of Redo panel)
Can me merge these reports in either way?

would merge into this one

> In #78171#1440351, @PratikPB2123 wrote: > This looks identical to #96006 (The Replacement of Outliner Histories on use of Redo panel) > Can me merge these reports in either way? would merge into this one
Member

Added subscriber: @toki46-3

Added subscriber: @toki46-3
Member

Added subscriber: @Luciano

Added subscriber: @Luciano
Member

Added subscriber: @gfxcoder

Added subscriber: @gfxcoder
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:24:22 +01:00
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
9 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#78171
No description provided.