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:
authorDalai Felinto <dfelinto@gmail.com>2019-02-09 23:41:52 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-02-09 23:41:52 +0300
commit66c23ea2b4a4eb66490a8b9b6c57ed60ec934a42 (patch)
tree8bec50a3953f27fcca8dcfd199df7877f4925793 /source/blender/editors/space_outliner
parent69f50e6ea98c5f9ac082e9795e0cd3c1cba5378f (diff)
Cleanup: Use ID_IS_LINKED instead of id.lib
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index 92c68681a54..ee4b2bc9ef9 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -1065,7 +1065,7 @@ static int collection_flag_exec(bContext *C, wmOperator *op)
GSET_ITER(collections_to_edit_iter, data.collections_to_edit) {
LayerCollection *layer_collection = BLI_gsetIterator_getKey(&collections_to_edit_iter);
Collection *collection = layer_collection->collection;
- if (collection->id.lib != NULL) {
+ if (ID_IS_LINKED(collection)) {
continue;
}
if (clear) {
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index f10861b3fbf..37c224d0856 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_library = (ob->id.lib != NULL);
+ const bool is_linked = ID_IS_LINKED(ob);
if (do_disable) {
- if (!is_library) {
+ if (!is_linked) {
ob->restrictflag |= OB_RESTRICT_VIEW;
depsgraph_changed = true;
}
}
else if (do_isolate) {
- depsgraph_changed = (!is_library) && ((ob->restrictflag & OB_RESTRICT_VIEW) != 0);
+ depsgraph_changed = (!is_linked) && ((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_library) {
+ if (!is_linked) {
ob->restrictflag &= ~OB_RESTRICT_VIEW;
}
}
else if (ob->restrictflag & OB_RESTRICT_VIEW) {
- if (!is_library) {
+ if (!is_linked) {
ob->restrictflag &= ~OB_RESTRICT_VIEW;
base->flag &= ~BASE_HIDDEN;
}
@@ -342,7 +342,7 @@ static void hidebutton_layer_collection_flag_cb(bContext *C, void *poin, void *p
bool depsgraph_changed = false;
if (do_disable) {
- if (collection->id.lib == NULL) {
+ if (!ID_IS_LINKED(collection)) {
collection->flag |= COLLECTION_RESTRICT_VIEW;
depsgraph_changed = true;
}