Operators no longer save / restore their last-used properties when invoked. #38367

Closed
opened 2014-01-26 02:56:04 +01:00 by jigebren · 9 comments
jigebren commented 2014-01-26 02:56:04 +01:00 (Migrated from localhost:3001)

I filled this bug report after this discussion on blender.stackexchange.

System Information
Windows XP 32bits

Blender Version
Broken: 2.69.0 (r60995)
Worked: 2.62 (I don't know for versions between 2.62 and 2.69)

Short description of error
I have an operator that draws its own panel (via invoke_props_dialog) when invoked to let the user set properties, but those properties are not remember from one call to another, while they are saved if the Tool Shelf Redo feature is used.

Exact steps for others to reproduce the error

  • Paste the attached script into Text Editor and run it. It adds a Test Panel with a Test button to the Objects Data properties.
    operator_invoke.py
  • Use the operator Test button: it uses its default properties.
  • Change the properties in the popup panel, press Ok. Re-use the Test button: the last-used properties are not remembered, it still uses the default ones.
  • Now use the operator Test button, then modify the properties in the Tool Shelf. Re-use the Test button again: the properties from the Tool Shelf are now used in the popup panel instead of the default ones. (It does the same when using the Redo Last F6 panel to modify the properties).

For info, in Blender 2.62 the last-used properties were properly restored, and there was also a convenient "Restore Defaults" that automatically appeared in the popup panel (which is now gone in 2.69).

Maybe there was a change of design I'm not aware of between 2.62 and 2.69, anyway either invoke() should always restore the last-used properties (the most convenient solution IMO), or never do it. It should not be dependant of whether or not the Tool Shelf has been used.

I filled this bug report after [this discussion ](http://blender.stackexchange.com/questions/6520/should-an-operator-remember-its-last-used-settings-when-invoked) on blender.stackexchange. **System Information** Windows XP 32bits **Blender Version** Broken: 2.69.0 (r60995) Worked: 2.62 (I don't know for versions between 2.62 and 2.69) **Short description of error** I have an operator that draws its own panel (via invoke_props_dialog) when invoked to let the user set properties, but those properties are not remember from one call to another, while they are saved if the Tool Shelf Redo feature is used. **Exact steps for others to reproduce the error** - Paste the attached script into Text Editor and run it. It adds a Test Panel with a Test button to the Objects Data properties. [operator_invoke.py](https://archive.blender.org/developer/F75415/operator_invoke.py) - Use the operator Test button: it uses its default properties. - Change the properties in the popup panel, press Ok. Re-use the Test button: the last-used properties are not remembered, it still uses the default ones. - Now use the operator Test button, then modify the properties **in the Tool Shelf**. Re-use the Test button again: the properties from the Tool Shelf are now used in the popup panel instead of the default ones. (It does the same when using the Redo Last F6 panel to modify the properties). For info, in Blender 2.62 the last-used properties were properly restored, and there was also a convenient "Restore Defaults" that automatically appeared in the popup panel (which is now gone in 2.69). Maybe there was a change of design I'm not aware of between 2.62 and 2.69, anyway either invoke() should always restore the last-used properties (the most convenient solution IMO), or never do it. It should not be dependant of whether or not the Tool Shelf has been used.
jigebren commented 2014-01-26 02:56:04 +01:00 (Migrated from localhost:3001)
Author

Changed status to: 'Open'

Changed status to: 'Open'
jigebren commented 2014-01-26 02:56:04 +01:00 (Migrated from localhost:3001)
Author

Added subscriber: @jigebren

Added subscriber: @jigebren

Added subscriber: @mont29

Added subscriber: @mont29
Member

Added subscribers: @ideasman42, @LukasTonne

Added subscribers: @ideasman42, @LukasTonne
Member

I think this change was intentional: blender/blender@bec263e
@ideasman42: can you confirm?

I think this change was intentional: blender/blender@bec263e @ideasman42: can you confirm?
Campbell Barton was assigned by Lukas Tönne 2014-01-27 12:25:47 +01:00
Author

This issue was referenced by blender/blender-addons-contrib@9a1dcfbf2d

This issue was referenced by blender/blender-addons-contrib@9a1dcfbf2d8a625806b850b70b8e5f878443f870
Author

This issue was referenced by blender/blender@9a1dcfbf2d

This issue was referenced by blender/blender@9a1dcfbf2d8a625806b850b70b8e5f878443f870

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit blender/blender@9a1dcfbf2d.

Closed by commit blender/blender@9a1dcfbf2d.
Sign in to join this conversation.
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-addons#38367
No description provided.