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:
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/collection.c20
-rw-r--r--source/blender/blenkernel/intern/layer.c16
2 files changed, 26 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index dfb43812b49..eef4a6210c8 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -309,15 +309,21 @@ static void collection_object_cache_fill(ListBase *lb, Collection *collection, i
if (base == NULL) {
base = MEM_callocN(sizeof(Base), "Object Base");
base->object = cob->ob;
+ BLI_addtail(lb, base);
+ }
- if ((child_restrict & COLLECTION_RESTRICT_VIEW) == 0) {
- base->flag |= BASE_VISIBLE_VIEWPORT;
- }
- if ((child_restrict & COLLECTION_RESTRICT_RENDER) == 0) {
- base->flag |= BASE_VISIBLE_RENDER;
- }
+ int object_restrict = base->object->restrictflag;
- BLI_addtail(lb, base);
+ if (((child_restrict & COLLECTION_RESTRICT_VIEW) == 0) &&
+ ((object_restrict & OB_RESTRICT_VIEW) == 0))
+ {
+ base->flag |= BASE_VISIBLE_VIEWPORT;
+ }
+
+ if (((child_restrict & COLLECTION_RESTRICT_RENDER) == 0) &&
+ ((object_restrict & OB_RESTRICT_RENDER) == 0))
+ {
+ base->flag |= BASE_VISIBLE_RENDER;
}
}
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 090be7e0fe5..84915e628df 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -647,14 +647,24 @@ static void layer_collection_sync(
BLI_ghash_insert(view_layer->object_bases_hash, base->object, base);
}
- if ((child_restrict & COLLECTION_RESTRICT_VIEW) == 0) {
+ int object_restrict = base->object->restrictflag;
+
+ if (((child_restrict & COLLECTION_RESTRICT_VIEW) == 0) &&
+ ((object_restrict & OB_RESTRICT_VIEW) == 0))
+ {
base->flag |= BASE_VISIBLED | BASE_VISIBLE_VIEWPORT;
- if ((child_restrict & COLLECTION_RESTRICT_SELECT) == 0) {
+ if (((child_restrict & COLLECTION_RESTRICT_SELECT) == 0) &&
+ ((object_restrict & OB_RESTRICT_SELECT) == 0))
+ {
base->flag |= BASE_SELECTABLED;
}
}
- if ((child_restrict & COLLECTION_RESTRICT_RENDER) == 0) {
+
+ if (((child_restrict & COLLECTION_RESTRICT_RENDER) == 0) &&
+ ((object_restrict & OB_RESTRICT_RENDER) == 0))
+
+ {
base->flag |= BASE_VISIBLE_RENDER;
}