Cleanup: Avoid unnecessary & misleading Outliner context function call
The function used to be needed for recursing the tree, as the name indicated. But it has recently been ported to the new tree iterators so the recursion isn't necessary anymore.
This commit is contained in:
@@ -16,21 +16,15 @@
|
||||
|
||||
namespace blender::ed::outliner {
|
||||
|
||||
static void outliner_context_selected_ids_recursive(const SpaceOutliner &space_outliner,
|
||||
bContextDataResult *result)
|
||||
static void outliner_context_selected_ids(const SpaceOutliner *space_outliner,
|
||||
bContextDataResult *result)
|
||||
{
|
||||
tree_iterator::all(space_outliner, [&](const TreeElement *te) {
|
||||
tree_iterator::all(*space_outliner, [&](const TreeElement *te) {
|
||||
const TreeStoreElem *tse = TREESTORE(te);
|
||||
if ((tse->flag & TSE_SELECTED) && ELEM(tse->type, TSE_SOME_ID, TSE_LAYER_COLLECTION)) {
|
||||
CTX_data_id_list_add(result, tse->id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static void outliner_context_selected_ids(const SpaceOutliner *space_outliner,
|
||||
bContextDataResult *result)
|
||||
{
|
||||
outliner_context_selected_ids_recursive(*space_outliner, result);
|
||||
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user