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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-03-11 13:22:13 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-03-11 13:25:57 +0300
commit796683db8edb98adf2165fed458d08454cb7c977 (patch)
tree3d209533c3915cfbd59d498e3000b097f56017a9 /source
parentb70a13fb667f2121047673ea914fe84385f0d9c1 (diff)
Cycles: add view layer setting to exclude volumes, like hair and surfaces
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesdna/DNA_scene_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_scene.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 3a88cd0a33b..5759b237f83 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -242,6 +242,7 @@ typedef struct SceneRenderLayer {
#define SCE_LAY_STRAND (1 << 5)
#define SCE_LAY_FRS (1 << 6)
#define SCE_LAY_AO (1 << 7)
+#define SCE_LAY_VOLUMES (1 << 8)
/* flags between (1 << 8) and (1 << 15) are set to 1 already, for future options */
#define SCE_LAY_ALL_Z (1 << 15)
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 27d742fd33c..f974d5c563f 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -4018,6 +4018,16 @@ void rna_def_view_layer_common(StructRNA *srna, const bool scene)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
+ prop = RNA_def_property(srna, "use_volumes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_VOLUMES);
+ RNA_def_property_ui_text(prop, "Volumes", "Render volumes in this Layer");
+ if (scene) {
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+ }
+ else {
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ }
+
/* passes */
prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);