diff options
author | Yiming Wu <xp8110@outlook.com> | 2022-06-29 17:54:29 +0300 |
---|---|---|
committer | Yiming Wu <xp8110@outlook.com> | 2022-06-29 17:54:29 +0300 |
commit | 6dd8ceef2a21f64cbb61a96560c50c162f9dae39 (patch) | |
tree | dff82af871b36d7df37213cdcc2a94dfd1ca70b2 /source/blender/makesrna/intern/rna_material.c | |
parent | 2ac5b55289d361de7fccc9be188b98df358ab932 (diff) |
LineArt: Shadow and related functionalities.
This patch includes the full shadow functionality for LineArt:
- Light contour and cast shadow lines.
- Lit/shaded region selection.
- Enclosed light/shadow shape calculation.
- Silhouette/anti-silhouette selection.
- Intersection priority based on shadow edge identifier.
Reviewed By: Sebastian Parborg (zeddb)
Differential Revision: https://developer.blender.org/D15109
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 4fb7495bac8..4a9bc608598 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -754,6 +754,22 @@ static void rna_def_material_lineart(BlenderRNA *brna) "Effectiveness", "Faces with this material will behave as if it has set number of layers in occlusion"); RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialLineArt_update"); + + prop = RNA_def_property(srna, "intersection_priority", PROP_INT, PROP_NONE); + RNA_def_property_range(prop, 0, 255); + RNA_def_property_ui_text(prop, + "Intersection Priority", + "The intersection line will be included into the object with the " + "higher intersection priority value"); + RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialLineArt_update"); + + prop = RNA_def_property(srna, "use_intersection_priority_override", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_default(prop, 0); + RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_MATERIAL_CUSTOM_INTERSECTION_PRIORITY); + RNA_def_property_ui_text(prop, + "Use Intersection Priority", + "Override object and collection intersection priority value"); + RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialLineArt_update"); } void RNA_def_material(BlenderRNA *brna) |