[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49224] trunk/blender/source/blender/ editors/space_outliner/outliner_tools.c: Select Linked no works from Datablocks outliner view as well
Sergey Sharybin
sergey.vfx at gmail.com
Wed Jul 25 22:17:39 CEST 2012
Revision: 49224
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49224
Author: nazgul
Date: 2012-07-25 20:17:38 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Select Linked no works from Datablocks outliner view as well
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_outliner/outliner_tools.c
Modified: trunk/blender/source/blender/editors/space_outliner/outliner_tools.c
===================================================================
--- trunk/blender/source/blender/editors/space_outliner/outliner_tools.c 2012-07-25 19:46:23 UTC (rev 49223)
+++ trunk/blender/source/blender/editors/space_outliner/outliner_tools.c 2012-07-25 20:17:38 UTC (rev 49224)
@@ -530,6 +530,18 @@
(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 @@
{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 @@
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;
}
More information about the Bf-blender-cvs
mailing list