Commit: 69f50e6ea98c5f9ac082e9795e0cd3c1cba5378f
Author: Dalai Felinto
Date:   Sat Feb 9 14:26:27 2019 -0200
Branches: master
https://developer.blender.org/rB69f50e6ea98c5f9ac082e9795e0cd3c1cba5378f

Fix: objects in outliner cannot be disabled

But introduced on 191b8951f7a.
Reported on tracker as a comment on 3f537f30e6b0.

===================================================================

M       source/blender/editors/space_outliner/outliner_draw.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_draw.c 
b/source/blender/editors/space_outliner/outliner_draw.c
index 5ab06fabb89..f10861b3fbf 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -276,16 +276,16 @@ static void hidebutton_base_flag_cb(bContext *C, void 
*poin, void *poin2)
        bool do_isolate = (win->eventstate->ctrl != 0) && !do_disable;
        bool extend = (win->eventstate->shift != 0);
        bool depsgraph_changed = false;
-       const bool is_editable = BASE_EDITABLE((View3D *)NULL, base);
+       const bool is_library = (ob->id.lib != NULL);
 
        if (do_disable) {
-               if (is_editable) {
+               if (!is_library) {
                        ob->restrictflag |= OB_RESTRICT_VIEW;
                        depsgraph_changed = true;
                }
        }
        else if (do_isolate) {
-               depsgraph_changed = is_editable && ((ob->restrictflag & 
OB_RESTRICT_VIEW) != 0);
+               depsgraph_changed = (!is_library) && ((ob->restrictflag & 
OB_RESTRICT_VIEW) != 0);
 
                if (!extend) {
                        /* Make only one base visible. */
@@ -300,12 +300,12 @@ static void hidebutton_base_flag_cb(bContext *C, void 
*poin, void *poin2)
                        base->flag ^= BASE_HIDDEN;
                }
 
-               if (is_editable) {
+               if (!is_library) {
                        ob->restrictflag &= ~OB_RESTRICT_VIEW;
                }
        }
        else if (ob->restrictflag & OB_RESTRICT_VIEW) {
-               if (is_editable) {
+               if (!is_library) {
                        ob->restrictflag &= ~OB_RESTRICT_VIEW;
                        base->flag &= ~BASE_HIDDEN;
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to