diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 4fb7495bac8..252d2e657b5 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -367,13 +367,13 @@ static char *rna_GpencilColorData_path(const PointerRNA *UNUSED(ptr)) return BLI_strdup("grease_pencil"); } -static int rna_GpencilColorData_is_stroke_visible_get(PointerRNA *ptr) +static bool rna_GpencilColorData_is_stroke_visible_get(PointerRNA *ptr) { MaterialGPencilStyle *pcolor = ptr->data; return (pcolor->stroke_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH); } -static int rna_GpencilColorData_is_fill_visible_get(PointerRNA *ptr) +static bool rna_GpencilColorData_is_fill_visible_get(PointerRNA *ptr) { MaterialGPencilStyle *pcolor = (MaterialGPencilStyle *)ptr->data; return ((pcolor->fill_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH) || (pcolor->fill_style > 0)); @@ -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) |