Maniphest T54580

Node editor: Changing object pointers for multiple nodes registers as a single action for undo
Closed, Resolved

Assigned To
Campbell Barton (campbellbarton)
Authored By
Konstantins Visnevskis (kivig)
Apr 12 2018, 4:50 PM
Tags
  • BF Blender
Subscribers
Campbell Barton (campbellbarton)
Konstantins Visnevskis (kivig)
Philipp Oeser (lichtwerk)

Description

System Information
win 8.1x64, 3x gtx580

Blender Version
2.79a

Short description of error
Either changing object pointers for multiple nodes or repeated changes of a single node object pointer registers as a single action for undo. Executing Undo reverts all the pointer changes simultaneously, regardless if there were 1 or 10 of them.


Exact steps for others to reproduce the error

  • In the node editor, change the Object parameter of one, then another Texture Coordinate nodes.
  • Do Undo.
  • Object parameter of both changes gets undone.

If this is hard to correct due to some inherent property of particular parameter type, maybe when changing it, the node affected could get selected, as node selection seems to register with undo fine.

Revisions and Commits

rB Blender

Event Timeline

Konstantins Visnevskis (kivig) created this task.Apr 12 2018, 4:50 PM
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).Apr 13 2018, 10:12 AM

This is true for any pointer property afaics [changing any of these wont register in undo on first sight], so nothing particular to the Node editor.
This might be a known limitation, or a design decission, needs further clarification...

Philipp Oeser (lichtwerk) added a subscriber: Campbell Barton (campbellbarton).Apr 13 2018, 1:00 PM

@Campbell Barton (campbellbarton) : is that something to be investigated further?

Philipp Oeser (lichtwerk) assigned this task to Campbell Barton (campbellbarton).Jun 19 2018, 4:01 PM

Soo, looked into this a bit further and it seems like PROP_POINTER buttons indeed dont get undo pushes.
For a little detour: these are not flagged with UI_BUT_UNDO because they are of type UI_BTYPE_SEARCH_MENU (when they get defined via uiDefAutoButR)
Code is explicitly stating (here) that

/* buttons with value >= UI_BTYPE_SEARCH_MENU don't get undo pushes */

as can be followed here and here (we dont get an uiAfterFunc with undostr, so no undo push here...)

If we actually allow SEARCH_MENU buttons [only the ones that represent PROP_POINTER] like in D3489
blender seems to go properly through undosys_step_encode, undosys_step_decode and I didnt run into problems yet.
(but it may very well be that I dont oversee all consequences this might have...)

I think @Campbell Barton (campbellbarton) needs to have a look here though, current behavior could as well be by design and report could be closed...

Campbell Barton (campbellbarton) changed the task status from Unknown Status to Resolved by committing rB6bb825e0837e: Fix T54580: Pointer buttons skip undo push.Dec 3 2018, 8:45 AM
Campbell Barton (campbellbarton) added a commit: rB6bb825e0837e: Fix T54580: Pointer buttons skip undo push.