Many users have been requesting a way to remove unused datablocks from the file/session
"without closing and reopening" Blender (or at least that's the impression I'm getting).
This commit adds a new operator (exposed as the "Purge All" button in the header of
the "Orphaned Datablocks" mode in the Outliner, which seems to be the logical
place for this) for doing so. It does so by wrapping up the save and "revert"
(i.e. reload the saved file from disk, without needing to quit Blender) operators
along with a confirmation prompt for good measure.
Caveats:
* Ultimately, we still cannot really cleanly delete any datablocks from the current
session outright without reloading the file/data at some point. Thus, we do need
to reload the file again before it can be used.
* This does mean that this operation is irreversible. Notably, Undo history is lost
is doing this operation. Hence the warnings... (Then again, undo/redo actually
reloads the entire scene DB from memory, so it's not anything uncommon ;)
Other Notes:
* The addition of this operator brings this mode more into line with being a kind of
"Trashcan" place, with this new operator being the manual "Empty Trash" button.
If the "Orphaned Datablocks" name is too obscure, maybe we could rename this
mode to "Trash" or something similar?
Organize Maximize/Fullscreen mess and add a new fullscreen mode with no UI
* Maximize Editor: (old Ctrl+Up)
* Full Screen Window: (old Alt + F11)
* Full Screen Editor: new operator (Alt + F10)
* Change Show/Hide Header: (Alt + F9)
When the mode is on moving the mouse near the top right corner of the
editor shows an icon to go back to the normal editor mode.
This was originally intended for the multiview branch, but this
functionality also benefits non-stereo workflows, thus it can be
reviewed and committed independently.
Development notes:
* This includes cleanups in the code to sanitize the naming of
fullscreen/maximize across the window/editor code.
* Originally the idea was to make the window fullscreen as well, but
this idea was dropped.
* You can see the clicking area when debug is 1
* Technically the user can be left with an unfaded icon in the corner
(specially when using a tablet). If we think this is too bad we can
increase the action zone to be the whole screen, or something similar.
Reviewers: campbellbarton [1], ton [2], fsiddi [2]
[1] actual code review
[2] design review
Differential Revision: https://developer.blender.org/D678
Notes:
* Made those edits by full checking of py files, so I should have spoted most needed edits, yet it remains quite probable I missed a few ones, we'll fix if/when someone notice it...
* Also made some cleanup "on the road"!
* Code cleanup in the space_*.py files.
* Removed layout.column() statement in _MT_ panels, they are useless.
* Only define variables at the beginning of a function!
ui/ --> startup/bl_ui
op/ --> startup/bl_operators
scripts/startup/ is now the only auto-loading script dir which gives some speedup for blender loading too.
~/.blender/2.56/scripts/startup works for auto-loading scripts too.