diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-13 13:34:24 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-13 13:34:24 +0300 |
commit | f3bd89b1b7a86778ff4c633a6b4115309a1b3c7e (patch) | |
tree | 5ad7a2669f06bbb4bea325d580fd128b316d4858 /source/blender/editors | |
parent | dfb1395fa577d04d9d4bcf2d9ddddd4cea36570a (diff) |
Related to #26061: Camera does not appear selected in outliner when it is
Draw higlighting circle for active camera in outliner
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 12 |
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; } |