[Bf-committers] Added camera UI view switch to outliner.c [diff]
Kenneth Styrberg
kenneth.styrberg at telia.com
Wed Oct 13 21:44:36 CEST 2004
Hi here's an addition to outliner which switches the UI to F9-view when
activating camera in Outliner
//styken
Index: source/blender/src/outliner.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/outliner.c,v
retrieving revision 1.12
diff -u -r1.12 outliner.c
--- source/blender/src/outliner.c 11 Oct 2004 18:35:42 -0000 1.12
+++ source/blender/src/outliner.c 12 Oct 2004 20:53:19 -0000
@@ -1013,6 +1013,26 @@
return 0;
}
+static int tree_element_active_camera(SpaceOops *soops, TreeElement
*te, int set)
+{
+ Object *ob;
+
+ /* we search for the object parent */
+ ob= (Object *)outliner_search_back(soops, te, ID_OB);
+ if(ob!=OBACT) return 0; // just paranoia
+
+ if(set) {
+ extern_set_butspace(F9KEY);
+ BIF_all_preview_changed();
+ allqueue(REDRAWBUTSSHADING, 1);
+ allqueue(REDRAWOOPS, 0);
+ allqueue(REDRAWIPO, 0);
+ }
+ else return 1;
+
+ return 0;
+}
+
static int tree_element_active_world(SpaceOops *soops, TreeElement *te,
int set)
{
TreeElement *tep;
@@ -1183,6 +1203,8 @@
return tree_element_active_world(soops, te, set);
case ID_LA:
return tree_element_active_lamp(soops, te, set);
+ case ID_CA:
+ return tree_element_active_camera(soops, te, set);
case ID_IP:
return tree_element_active_ipo(soops, te, set);
case ID_TE:
More information about the Bf-committers
mailing list