[Bf-blender-cvs] [a3d4a6ad9f8] greasepencil-object: GPencil: Disable Glow Blend mode when Glow Under mode is set

Antonio Vazquez noreply at git.blender.org
Sun Feb 16 20:08:29 CET 2020


Commit: a3d4a6ad9f8569432a49d45a232e0e416f494ca6
Author: Antonio Vazquez
Date:   Sun Feb 16 13:05:09 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rBa3d4a6ad9f8569432a49d45a232e0e416f494ca6

GPencil: Disable Glow Blend mode when Glow Under mode is set

===================================================================

M	release/scripts/startup/bl_ui/properties_data_shaderfx.py
M	source/blender/makesrna/intern/rna_shader_fx.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_data_shaderfx.py b/release/scripts/startup/bl_ui/properties_data_shaderfx.py
index 9b3bf1dfb9f..f3124ba597e 100644
--- a/release/scripts/startup/bl_ui/properties_data_shaderfx.py
+++ b/release/scripts/startup/bl_ui/properties_data_shaderfx.py
@@ -137,11 +137,14 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
             layout.prop(fx, "select_color")
 
         layout.separator()
-        layout.prop(fx, "blend_mode", text="Blend")
+        row = layout.row()
+        row.enabled = not (fx.use_glow_under and fx.blend_mode == 'REGULAR')
+        row.prop(fx, "blend_mode", text="Blend")
+
         layout.prop(fx, "radius")
         layout.prop(fx, "rotation")
         layout.prop(fx, "samples")
-        layout.prop(fx, "use_alpha_mode", text="Use Alpha Mode")
+        layout.prop(fx, "use_glow_under", text="Glow Under")
 
     def FX_SWIRL(self, layout, fx):
         layout.prop(fx, "object", text="Object")
diff --git a/source/blender/makesrna/intern/rna_shader_fx.c b/source/blender/makesrna/intern/rna_shader_fx.c
index 0b8d36fb35d..c9c17c850b4 100644
--- a/source/blender/makesrna/intern/rna_shader_fx.c
+++ b/source/blender/makesrna/intern/rna_shader_fx.c
@@ -553,9 +553,10 @@ static void rna_def_shader_fx_glow(BlenderRNA *brna)
   RNA_def_property_ui_text(prop, "Samples", "Number of Blur Samples");
   RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_ShaderFx_update");
 
-  prop = RNA_def_property(srna, "use_alpha_mode", PROP_BOOLEAN, PROP_NONE);
+  prop = RNA_def_property(srna, "use_glow_under", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", FX_GLOW_USE_ALPHA);
-  RNA_def_property_ui_text(prop, "Use Alpha", "Glow only areas with alpha");
+  RNA_def_property_ui_text(
+      prop, "Glow Under", "Glow only areas with alpha (not supported with Regular blend mode)");
   RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_ShaderFx_update");
 
   prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ANGLE);



More information about the Bf-blender-cvs mailing list