[Bf-blender-cvs] [7c2db4036d4] greasepencil-object: Remove duplicate colors properties
Antonio Vazquez
noreply at git.blender.org
Sun May 13 12:06:47 CEST 2018
Commit: 7c2db4036d49883c40177d4923d9e004b3094ead
Author: Antonio Vazquez
Date: Sun May 13 12:06:38 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB7c2db4036d49883c40177d4923d9e004b3094ead
Remove duplicate colors properties
These properties were to allow to change alpha in list of colors, but it can produe errors with animation.
===================================================================
M release/scripts/startup/bl_ui/properties_material_gpencil.py
M source/blender/makesrna/intern/rna_material.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index 132d98cd3e0..7f4dca27bdd 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -35,8 +35,8 @@ class GPENCIL_UL_matslots(UIList):
split = layout.split(percentage=0.25)
row = split.row(align=True)
row.enabled = not gpcolor.lock
- row.prop(gpcolor, "color_rgba", text="", emboss=gpcolor.is_stroke_visible)
- row.prop(gpcolor, "fill_rgba", text="", emboss=gpcolor.is_fill_visible)
+ row.prop(gpcolor, "color", text="", emboss=gpcolor.is_stroke_visible)
+ row.prop(gpcolor, "fill_color", text="", emboss=gpcolor.is_fill_visible)
split.prop(ma, "name", text="", emboss=False)
row = layout.row(align=True)
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 92689d97c8b..dd8f94c61d2 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -412,13 +412,6 @@ static void rna_def_material_greasepencil(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Color", "");
RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_Material_update");
- prop = RNA_def_property(srna, "color_rgba", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_float_sdna(prop, NULL, "rgb");
- RNA_def_property_array(prop, 4);
- RNA_def_property_ui_text(prop, "Color Rgba", "");
- RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_Material_update");
-
prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rgb[3]");
RNA_def_property_range(prop, 0.0, 1.0f);
@@ -433,13 +426,6 @@ static void rna_def_material_greasepencil(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Fill Color", "Color for filling region bounded by each stroke");
RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_Material_update");
- prop = RNA_def_property(srna, "fill_rgba", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "fill");
- RNA_def_property_array(prop, 4);
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Fill Color Rgba", "Color for filling region bounded by each stroke");
- RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_Material_update");
-
/* Fill alpha */
prop = RNA_def_property(srna, "fill_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fill[3]");
More information about the Bf-blender-cvs
mailing list