diff options
author | Bastien Montagne <bastien@blender.org> | 2021-02-25 19:43:14 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-02-25 19:48:54 +0300 |
commit | 2718ea80d26274464051c50bb12fb82c4a6571ea (patch) | |
tree | 4faa78e970d3e959194baa7e6a53545f315d277a /release | |
parent | ec4d412c9c7bcb579104bf1286ed98aa9927e86e (diff) |
Improve Purge operator.
The Purge operator to remove unused IDs can now also remove 'indirectly
unused' data-blocks (those only used by unused ones, recursively).
It can also now only operate on linked, or on local data.
All those options are exposed in the `File -> Cleanup` main menu.
The behavior of the `Purge` button in the Outliner remains unchanged,
needs some UI/UX design task for that.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_topbar.py | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 255b6326416..45460a1a5de 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -248,7 +248,34 @@ class TOPBAR_MT_file_cleanup(Menu): layout = self.layout layout.separator() - layout.operator("outliner.orphans_purge", text="Unused Data-Blocks") + op_props = layout.operator("outliner.orphans_purge", text="Unused Data-Blocks") + op_props.do_local_ids = True + op_props.do_linked_ids = True + op_props.do_recursive = False + op_props = layout.operator("outliner.orphans_purge", text="Recursive Unused Data-Blocks") + op_props.do_local_ids = True + op_props.do_linked_ids = True + op_props.do_recursive = True + + layout.separator() + op_props = layout.operator("outliner.orphans_purge", text="Unused Linked Data-Blocks") + op_props.do_local_ids = False + op_props.do_linked_ids = True + op_props.do_recursive = False + op_props = layout.operator("outliner.orphans_purge", text="Recursive Unused Linked Data-Blocks") + op_props.do_local_ids = False + op_props.do_linked_ids = True + op_props.do_recursive = True + + layout.separator() + op_props = layout.operator("outliner.orphans_purge", text="Unused Local Data-Blocks") + op_props.do_local_ids = True + op_props.do_linked_ids = False + op_props.do_recursive = False + op_props = layout.operator("outliner.orphans_purge", text="Recursive Unused Local Data-Blocks") + op_props.do_local_ids = True + op_props.do_linked_ids = False + op_props.do_recursive = True class TOPBAR_MT_file(Menu): |