diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-05-20 13:14:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-20 14:47:37 +0300 |
commit | 785ff8e1d2e973e10c1a3aea3a986c7e1d3cf1db (patch) | |
tree | 086ac1ae7f7fcf8b49f12d6d904cb2590a1c00b6 /source/blender/editors/space_outliner/outliner_draw.c | |
parent | 81320ce7f7c699d832edf8ba0f609bb246389a33 (diff) |
UI: add Visibility panel for objects
The outliner should not be the only way for users to change these settings.
The Python API was extended to keep these properties positive and keyframable.
Differential Revision: https://developer.blender.org/D4889
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_draw.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 6a7795393c9..f34f280a29d 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1088,10 +1088,13 @@ static void outliner_draw_restrictbuts(uiBlock *block, } if (soops->show_restrict_flags & SO_RESTRICT_SELECT) { + const int icon = RNA_property_boolean_get(&ptr, props.object_hide_select) ? + ICON_RESTRICT_SELECT_ON : + ICON_RESTRICT_SELECT_OFF; bt = uiDefIconButR_prop(block, UI_BTYPE_ICON_TOGGLE, 0, - 0, + icon, (int)(ar->v2d.cur.xmax - restrict_offsets.select), te->ys, UI_UNIT_X, @@ -1113,10 +1116,13 @@ static void outliner_draw_restrictbuts(uiBlock *block, } if (soops->show_restrict_flags & SO_RESTRICT_VIEWPORT) { + const int icon = RNA_property_boolean_get(&ptr, props.object_hide_viewport) ? + ICON_RESTRICT_VIEW_ON : + ICON_RESTRICT_VIEW_OFF; bt = uiDefIconButR_prop(block, UI_BTYPE_ICON_TOGGLE, 0, - 0, + icon, (int)(ar->v2d.cur.xmax - restrict_offsets.viewport), te->ys, UI_UNIT_X, @@ -1138,10 +1144,13 @@ static void outliner_draw_restrictbuts(uiBlock *block, } if (soops->show_restrict_flags & SO_RESTRICT_RENDER) { + const int icon = RNA_property_boolean_get(&ptr, props.object_hide_render) ? + ICON_RESTRICT_RENDER_ON : + ICON_RESTRICT_RENDER_OFF; bt = uiDefIconButR_prop(block, UI_BTYPE_ICON_TOGGLE, 0, - 0, + icon, (int)(ar->v2d.cur.xmax - restrict_offsets.render), te->ys, UI_UNIT_X, |