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
parent69f50e6ea98c5f9ac082e9795e0cd3c1cba5378f (diff)
Cleanup: Use ID_IS_LINKED instead of id.lib
-rw-r--r--source/blender/blenkernel/intern/layer.c6
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c12
3 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index d660e5e6424..b7073045d6c 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -1005,7 +1005,7 @@ bool BKE_layer_collection_isolate(Scene *scene, ViewLayer *view_layer, LayerColl
bool depsgraph_need_update = false;
LayerCollection *lc_master = view_layer->layer_collections.first;
- if (lc->collection->id.lib == NULL) {
+ if (!ID_IS_LINKED(lc->collection)) {
if (lc->collection->flag & COLLECTION_RESTRICT_VIEW) {
lc->collection->flag &= ~COLLECTION_RESTRICT_VIEW;
depsgraph_need_update = true;
@@ -1029,7 +1029,7 @@ bool BKE_layer_collection_isolate(Scene *scene, ViewLayer *view_layer, LayerColl
}
while (lc_parent != lc) {
- if (lc_parent->collection->id.lib == NULL) {
+ if (!ID_IS_LINKED(lc_parent->collection)) {
if (lc_parent->collection->flag & COLLECTION_RESTRICT_VIEW) {
lc_parent->collection->flag &= ~COLLECTION_RESTRICT_VIEW;
depsgraph_need_update = true;
@@ -1089,7 +1089,7 @@ bool BKE_layer_collection_set_visible(ViewLayer *view_layer, LayerCollection *lc
bool depsgraph_changed = false;
if (visible &&
- (lc->collection->id.lib == NULL) &&
+ (!ID_IS_LINKED(lc->collection)) &&
((lc->collection->flag & COLLECTION_RESTRICT_VIEW) != 0))
{
lc->collection->flag &= ~COLLECTION_RESTRICT_VIEW;
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;
}