Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-02-13 13:34:24 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2011-02-13 13:34:24 +0300
commitf3bd89b1b7a86778ff4c633a6b4115309a1b3c7e (patch)
tree5ad7a2669f06bbb4bea325d580fd128b316d4858
parentdfb1395fa577d04d9d4bcf2d9ddddd4cea36570a (diff)
Related to #26061: Camera does not appear selected in outliner when it is
Draw higlighting circle for active camera in outliner
-rw-r--r--source/blender/editors/space_outliner/outliner.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 3007cfc4cb4..895cfc74498 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -2109,6 +2109,16 @@ static int tree_element_active_lamp(bContext *UNUSED(C), Scene *scene, SpaceOops
return 0;
}
+static int tree_element_active_camera(bContext *UNUSED(C), Scene *scene, SpaceOops *soops, TreeElement *te, int set)
+{
+ Object *ob= (Object *)outliner_search_back(soops, te, ID_OB);
+
+ if(set)
+ return 0;
+
+ return scene->camera == ob;
+}
+
static int tree_element_active_world(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, int set)
{
TreeElement *tep;
@@ -2343,6 +2353,8 @@ static int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, Tree
return tree_element_active_texture(C, scene, soops, te, set);
case ID_TXT:
return tree_element_active_text(C, scene, soops, te, set);
+ case ID_CA:
+ return tree_element_active_camera(C, scene, soops, te, set);
}
return 0;
}