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/makesrna/intern/rna_layer.c')
-rw-r--r--source/blender/makesrna/intern/rna_layer.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c
index bab7375f01b..12d89ef5deb 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -123,18 +123,13 @@ static IDProperty *rna_ViewLayer_idprops(PointerRNA *ptr, bool create)
static bool rna_LayerCollection_visible_get(LayerCollection *layer_collection, bContext *C)
{
View3D *v3d = CTX_wm_view3d(C);
- const bool runtime_visible = (layer_collection->runtime_flag & LAYER_COLLECTION_VISIBLE) != 0;
- if (v3d == NULL) {
- return runtime_visible;
- }
-
- if ((v3d->flag & V3D_LOCAL_COLLECTIONS) == 0) {
- return runtime_visible;
+ if ((v3d == NULL) || ((v3d->flag & V3D_LOCAL_COLLECTIONS) == 0)) {
+ return (layer_collection->runtime_flag & LAYER_COLLECTION_VISIBLE_VIEW_LAYER) != 0;
}
if (v3d->local_collections_uuid & layer_collection->local_collections_bits) {
- return true;
+ return (layer_collection->runtime_flag & LAYER_COLLECTION_RESTRICT_VIEWPORT) == 0;
}
return false;
@@ -415,12 +410,12 @@ static void rna_def_layer_collection(BlenderRNA *brna)
/* Run-time flags. */
prop = RNA_def_property(srna, "is_visible", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "runtime_flag", LAYER_COLLECTION_VISIBLE);
+ RNA_def_property_boolean_sdna(prop, NULL, "runtime_flag", LAYER_COLLECTION_VISIBLE_VIEW_LAYER);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(
- prop,
- "Visible",
- "Whether this collection is visible, take into account the collection parent");
+ RNA_def_property_ui_text(prop,
+ "Visible",
+ "Whether this collection is visible for the viewlayer, take into "
+ "account the collection parent");
func = RNA_def_function(srna, "has_objects", "rna_LayerCollection_has_objects");
RNA_def_function_ui_description(func, "");