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:
authorClément Foucault <foucault.clem@gmail.com>2020-04-23 18:40:22 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-04-23 18:41:21 +0300
commit40f2c92460c356f5ab22d4b9e138383014d95aae (patch)
treed645dcaff6419c89c87a826ccda8e02788d6f4e3 /source/blender/blenkernel/intern/material.c
parent2467f4df79755b4d503a1b7f93da36cea31fbc53 (diff)
Fix T72506 EEVEE: Collection Holdout propagates accross material instances
This fix the issue by introducing a default material only for collection holdouts. This avoids hash colision when the same material is used in collections without holdout enabled.
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r--source/blender/blenkernel/intern/material.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 5516e877b10..f641531d577 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1624,11 +1624,13 @@ void BKE_material_eval(struct Depsgraph *depsgraph, Material *material)
* default shader nodes. */
static Material default_material_empty;
+static Material default_material_holdout;
static Material default_material_surface;
static Material default_material_volume;
static Material default_material_gpencil;
static Material *default_materials[] = {&default_material_empty,
+ &default_material_holdout,
&default_material_surface,
&default_material_volume,
&default_material_gpencil,
@@ -1695,6 +1697,11 @@ Material *BKE_material_default_empty(void)
return &default_material_empty;
}
+Material *BKE_material_default_holdout(void)
+{
+ return &default_material_holdout;
+}
+
Material *BKE_material_default_surface(void)
{
return &default_material_surface;