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:
authorAntonio Vazquez <blendergit@gmail.com>2020-09-18 19:23:25 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-09-18 19:28:17 +0300
commit0335c1fd21dd49906968a2aa85b0016c8047f695 (patch)
treec424f99fbb8ee688156de6c51f4e9f65f3e9aa66 /source/blender/makesrna/intern/rna_material.c
parent7b988188dc3f5ea05d90b8e16337147778f9f580 (diff)
GPencil: Implement Holdout materials
This new feature allows to use the strokes as an eraser of any stroke below. This is very handy to open holes in filled areas. After running some tests, we have decided to keep the additive effect of the holdout color. To get clean holdout areas, just move the color to black to remove any additive effect. To have additive effect can be used in situations like tint slightly a transparent window with blue to simulate the glass. See T79878 for more details Differential Revision: https://developer.blender.org/D8932
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r--source/blender/makesrna/intern/rna_material.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 1004fc94d16..c358b61d24c 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -564,6 +564,18 @@ static void rna_def_material_greasepencil(BlenderRNA *brna)
prop, "Self Overlap", "Disable stencil and overlap self intersections with alpha materials");
RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update");
+ prop = RNA_def_property(srna, "use_stroke_holdout", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_MATERIAL_IS_STROKE_HOLDOUT);
+ RNA_def_property_ui_text(
+ prop, "Holdout", "Remove the color from underneath strokes using current stroke as mask");
+ RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update");
+
+ prop = RNA_def_property(srna, "use_fill_holdout", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_MATERIAL_IS_FILL_HOLDOUT);
+ RNA_def_property_ui_text(
+ prop, "Holdout", "Remove the color from underneath strokes using current stroke as mask");
+ RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update");
+
prop = RNA_def_property(srna, "show_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_MATERIAL_STROKE_SHOW);
RNA_def_property_ui_text(prop, "Show Stroke", "Show stroke lines of this material");