diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 18 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 27 |
2 files changed, 32 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index 6fd897a3d66..7c5c6d26bd6 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -2997,20 +2997,22 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna) RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); - prop = RNA_def_property(srna, "use_transparency", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "transparency_flags", LRT_GPENCIL_TRANSPARENCY_ENABLE); + 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_ui_text( - prop, "Use Transparency", "Use transparency mask from this material in line art"); + 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_transparency_match", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "transparency_flags", LRT_GPENCIL_TRANSPARENCY_MATCH); + 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_ui_text( - prop, "Match Transparency", "Require matching all transparency masks instead of just one"); + prop, "Match Masks", "Require matching all material masks instead of just one"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); - prop = RNA_def_property(srna, "use_transparency_mask", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "transparency_mask", 1); + 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_update(prop, 0, "rna_GpencilModifier_update"); diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index a4052430d9a..b662f54ed4c 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -688,19 +688,36 @@ static void rna_def_material_lineart(BlenderRNA *brna) RNA_def_struct_sdna(srna, "MaterialLineArt"); RNA_def_struct_ui_text(srna, "Material Line Art", ""); - prop = RNA_def_property(srna, "use_transparency", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_material_mask", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_default(prop, 0); - RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_MATERIAL_TRANSPARENCY_ENABLED); + RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_MATERIAL_MASK_ENABLED); RNA_def_property_ui_text( - prop, "Use Transparency", "Use transparency mask from this material in line art"); + prop, "Use Material Mask", "Use material masks to filter out occluded strokes"); RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialLineArt_update"); - prop = RNA_def_property(srna, "use_transparency_mask", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_material_mask_bits", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_default(prop, 0); - RNA_def_property_boolean_sdna(prop, NULL, "transparency_mask", 1); + 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_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialLineArt_update"); + + prop = RNA_def_property(srna, "use_mat_occlusion", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_default(prop, 0); + RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_MATERIAL_CUSTOM_OCCLUSION_EFFECTIVENESS); + RNA_def_property_ui_text(prop, + "Custom Occlusion Effectiveness", + "Use custom occlusion effectiveness for this material"); + RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialLineArt_update"); + + prop = RNA_def_property(srna, "mat_occlusion", PROP_INT, PROP_NONE); + RNA_def_property_int_default(prop, 1); + RNA_def_property_ui_range(prop, 0.0f, 5.0f, 1.0f, 1); + RNA_def_property_ui_text( + prop, + "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"); } void RNA_def_material(BlenderRNA *brna) |