[Bf-blender-cvs] [84eae294ae3] greasepencil-object: WIP: More changes in Fill Panel

Antonio Vazquez noreply at git.blender.org
Wed Jun 6 20:17:26 CEST 2018


Commit: 84eae294ae372e9433caf81646d008feaa6f0214
Author: Antonio Vazquez
Date:   Wed Jun 6 20:17:18 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB84eae294ae372e9433caf81646d008feaa6f0214

WIP: More changes in Fill Panel

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

M	release/scripts/startup/bl_ui/properties_material_gpencil.py

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

diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index f18230a85e7..c3a8660ede6 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -188,39 +188,40 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
             col = layout.column()
             col.active = not gpcolor.lock
             col.prop(gpcolor, "fill_style", text="Style")
+
             if gpcolor.fill_style == 'GRADIENT':
                 col.prop(gpcolor, "gradient_type")
 
             if gpcolor.fill_style != 'TEXTURE':
                 col.prop(gpcolor, "fill_color", text="Color")
-                if gpcolor.texture_mix is True or gpcolor.fill_style == 'GRADIENT':
-                    col.prop(gpcolor, "mix_factor", text="Mix", slider=True)
 
-            if gpcolor.fill_style in ('GRADIENT', 'CHESSBOARD'):
-                if gpcolor.texture_mix is False or gpcolor.fill_style == 'CHESSBOARD':
-                    col.prop(gpcolor, "mix_color", text="Mix Color")
-                col.prop(gpcolor, "flip", text="Flip Colors")
+                if gpcolor.fill_style in ('GRADIENT', 'CHESSBOARD'):
+                    col.prop(gpcolor, "mix_color", text="Secondary Color")
 
-                col.prop(gpcolor, "pattern_shift", text="Location")
+                if gpcolor.texture_mix is True or gpcolor.fill_style == 'GRADIENT':
+                    col.prop(gpcolor, "mix_factor", text="Mix Factor", slider=True)
 
-                subrow = col.row(align=True)
-                if gpcolor.gradient_type == 'RADIAL':
-                    subrow.enabled = False
-                subrow.prop(gpcolor, "pattern_angle", text="Angle")
+                if gpcolor.fill_style in ('GRADIENT', 'CHESSBOARD'):
+                    col.prop(gpcolor, "flip", text="Flip Colors")
 
-                col.prop(gpcolor, "pattern_scale", text="Scale")
-                if gpcolor.gradient_type != 'RADIAL':
+                    col.prop(gpcolor, "pattern_shift", text="Location")
+                    col.prop(gpcolor, "pattern_scale", text="Scale")
+
+                if gpcolor.gradient_type == 'RADIAL' and gpcolor.fill_style not in ('SOLID', 'CHESSBOARD'):
                     col.prop(gpcolor, "pattern_radius", text="Radius")
+                else:
+                    if gpcolor.fill_style != 'SOLID':
+                        col.prop(gpcolor, "pattern_angle", text="Angle")
 
-                subrow = col.row(align=True)
-                if gpcolor.fill_style != 'CHESSBOARD':
-                    subrow.enabled = False
-                subrow.prop(gpcolor, "pattern_boxsize", text="Box")
+                if gpcolor.fill_style == 'CHESSBOARD':
+                    col.prop(gpcolor, "pattern_boxsize", text="Box")
 
+            # Solid
             if gpcolor.fill_style == 'SOLID':
-                col.prop(gpcolor, "texture_mix", text="Mix Texture")
+                col.prop(gpcolor, "texture_mix", text="Mix With Texture")
 
-            if gpcolor.fill_style == 'TEXTURE' or gpcolor.texture_mix is True:
+            # Texture
+            if gpcolor.fill_style == 'TEXTURE' or (gpcolor.texture_mix is True and gpcolor.fill_style == 'SOLID'):
                 col.template_ID(gpcolor, "fill_image", open="image.open")
                 col.prop(gpcolor, "use_fill_pattern", text="Use As Pattern")



More information about the Bf-blender-cvs mailing list