diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-26 00:17:38 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-26 00:17:38 +0400 |
commit | 06a9482986daa8beea1bbb627e2b78b4c28bd3d2 (patch) | |
tree | dd1e2cbc8b9fecb41aff1d2f8b60dc4ce828318c /source/blender/editors | |
parent | 4ca9275b448fa62fa1c0d55007417558c6552d77 (diff) |
Select Linked no works from Datablocks outliner view as well
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index acfaadb947d..bf76fdda61e 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -530,6 +530,18 @@ static void sequence_cb(int event, TreeElement *te, TreeStoreElem *tselem, void (void)tselem; } +static void data_select_linked_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *C_v) +{ + if (event == 5) { + if (RNA_struct_is_ID(te->rnaptr.type)) { + bContext *C = (bContext *) C_v; + ID *id = te->rnaptr.data; + + ED_object_select_linked_by_id(C, id); + } + } +} + static void outliner_do_data_operation(SpaceOops *soops, int type, int event, ListBase *lb, void (*operation_cb)(int, TreeElement *, TreeStoreElem *, void *), void *arg) @@ -1131,6 +1143,7 @@ static EnumPropertyItem prop_data_op_types[] = { {2, "DESELECT", 0, "Deselect", ""}, {3, "HIDE", 0, "Hide", ""}, {4, "UNHIDE", 0, "Unhide", ""}, + {5, "SELECT_LINKED", 0, "Select Linked", ""}, {0, NULL, 0, NULL, NULL} }; @@ -1174,6 +1187,11 @@ static int outliner_data_operation_exec(bContext *C, wmOperator *op) outliner_do_data_operation(soops, datalevel, event, &soops->tree, sequence_cb, scene); } } + else if (datalevel == TSE_RNA_STRUCT) { + if (event == 5) { + outliner_do_data_operation(soops, datalevel, event, &soops->tree, data_select_linked_cb, C); + } + } return OPERATOR_FINISHED; } |