Blender Git Loki
Git Commits -> Revision c0e055f
Revision c0e055f by Julian Eisel (master) February 28, 2017, 20:15 (GMT) |
Outliner: Delete all selected collections, not just active one There were some issues with how we store outliner tree elements: Apparently the only removable elements have been data-blocks so far. When recreating the TreeElements, their TreeStoreElem instances were mainly identified by their ID pointer. However non-data-blocks mostly depend on an index. For collections, such an index isn't a reliable measure though if we want to allow removing items. Depending on it for identifying the TreeStoreElem instance would cause some quite noticeable glitches (wrong highlights, two elements sharing highlight, etc). For now I've solved that by actually removing the TreeStoreElem that represents the removed element. A little limitation of this is that after undoing the removal, some information might get lost, like flags to store selection, or opened/closed state. A better solution that would also fix this issue would be having a real unique identifier for each non-data-block element, like an idname or even its data-pointer. Not sure if we can get those to work reliable with file read/write though, would have to investigate... Also added a general Outliner tree traversal utility. |
Commit Details:
Full Hash: c0e055fa7e4b171b9a188bc2328c6c11d2af22ab
Parent Commit: 5e889eb
Lines Changed: +156, -38
9 Modified Paths:
/release/scripts/startup/bl_ui/space_outliner.py (+1, -1) (Diff)
/source/blender/blenkernel/BKE_outliner_treehash.h (+2, -1) (Diff)
/source/blender/blenkernel/intern/outliner_treehash.c (+37, -2) (Diff)
/source/blender/blenloader/intern/versioning_280.c (+1, -0) (Diff)
/source/blender/editors/space_outliner/outliner_collections.c (+36, -28) (Diff)
/source/blender/editors/space_outliner/outliner_edit.c (+44, -0) (Diff)
/source/blender/editors/space_outliner/outliner_intern.h (+17, -1) (Diff)
/source/blender/editors/space_outliner/outliner_ops.c (+1, -1) (Diff)
/source/blender/editors/space_outliner/outliner_tree.c (+17, -4) (Diff)
/source/blender/blenkernel/BKE_outliner_treehash.h (+2, -1) (Diff)
/source/blender/blenkernel/intern/outliner_treehash.c (+37, -2) (Diff)
/source/blender/blenloader/intern/versioning_280.c (+1, -0) (Diff)
/source/blender/editors/space_outliner/outliner_collections.c (+36, -28) (Diff)
/source/blender/editors/space_outliner/outliner_edit.c (+44, -0) (Diff)
/source/blender/editors/space_outliner/outliner_intern.h (+17, -1) (Diff)
/source/blender/editors/space_outliner/outliner_ops.c (+1, -1) (Diff)
/source/blender/editors/space_outliner/outliner_tree.c (+17, -4) (Diff)