diff options
author | YimingWu <xp8110@outlook.com> | 2021-06-29 15:47:55 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-06-29 15:47:55 +0300 |
commit | d1e0059eac99654624edee2a2390a3e2fdc4c7cb (patch) | |
tree | 3983e4f1b78fa3bd85e5cb16a0a010e4e3351815 /source/blender/makesrna | |
parent | 5d5cf5308129f1632cd6e303df52dadf63026675 (diff) |
LineArt: Filtering intersection lines using mask numbers
Mask value works just like transparency mask.
You are able to select intersection lines inside a
collection or, between collections.
Reviewed By: Sebastian Parborg (zeddb)
Differential Revision: https://developer.blender.org/D11309
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_collection.c | 13 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 20 |
2 files changed, 28 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_collection.c b/source/blender/makesrna/intern/rna_collection.c index 643503e52fa..577a3273e21 100644 --- a/source/blender/makesrna/intern/rna_collection.c +++ b/source/blender/makesrna/intern/rna_collection.c @@ -548,6 +548,19 @@ void RNA_def_collections(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Usage", "How to use this collection in line art"); RNA_def_property_update(prop, NC_SCENE, NULL); + prop = RNA_def_property(srna, "lineart_use_intersection_mask", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "lineart_flags", 1); + RNA_def_property_ui_text( + prop, "Use Intersection Masks", "Use custom intersection mask for faces in this collection"); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop = RNA_def_property(srna, "lineart_intersection_mask", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "lineart_intersection_mask", 1); + RNA_def_property_array(prop, 8); + RNA_def_property_ui_text( + prop, "Masks", "Intersection generated by this collection will have this mask value"); + RNA_def_property_update(prop, NC_SCENE, NULL); + prop = RNA_def_property(srna, "color_tag", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "color_tag"); RNA_def_property_enum_funcs( diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index 24b1e66bbb5..3e6048e30c4 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -2997,15 +2997,13 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); prop = RNA_def_property(srna, "use_material_mask", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna( - prop, NULL, "material_mask_flags", LRT_GPENCIL_MATERIAL_MASK_ENABLE); + RNA_def_property_boolean_sdna(prop, NULL, "mask_switches", LRT_GPENCIL_MATERIAL_MASK_ENABLE); RNA_def_property_ui_text( prop, "Use Material Mask", "Use material masks to filter out occluded strokes"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); prop = RNA_def_property(srna, "use_material_mask_match", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna( - prop, NULL, "material_mask_flags", LRT_GPENCIL_MATERIAL_MASK_MATCH); + RNA_def_property_boolean_sdna(prop, NULL, "mask_switches", LRT_GPENCIL_MATERIAL_MASK_MATCH); RNA_def_property_ui_text( prop, "Match Masks", "Require matching all material masks instead of just one"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); @@ -3013,7 +3011,19 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna) prop = RNA_def_property(srna, "use_material_mask_bits", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "material_mask_bits", 1); RNA_def_property_array(prop, 8); - RNA_def_property_ui_text(prop, "Mask", ""); + RNA_def_property_ui_text(prop, "Masks", "Mask bits to match from Material Line Art settings"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "use_intersection_match", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mask_switches", LRT_GPENCIL_INTERSECTION_MATCH); + RNA_def_property_ui_text( + prop, "Match Intersection", "Require matching all intersection masks instead of just one"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "use_intersection_mask", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "intersection_mask", 1); + RNA_def_property_array(prop, 8); + RNA_def_property_ui_text(prop, "Masks", "Mask bits to match from Collection Line Art settings"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); RNA_define_lib_overridable(false); |