Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-05-03 19:43:11 +0300
committerAntonioya <blendergit@gmail.com>2019-05-03 19:43:11 +0300
commitd23869eefab23c229db9c0dae0db062f7cd205f7 (patch)
tree7f128b0436d0fbc33b0d0773f78afe2a45062f12 /release
parent633c773fe4fcf11222f7e460f64d38d5a16e4ccf (diff)
GPencil: Add stroke color to Materials Popover
This makes more easy to manage the color, specially for advanced brushes with pinned materials. Reviewers: @pepeland, @mendio
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 734828bceaa..05a8735fc2f 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -881,6 +881,22 @@ class GreasePencilMaterialsPanel:
row.operator("gpencil.stroke_change_color", text="Assign")
row.operator("gpencil.color_select", text="Select").deselect = False
row.operator("gpencil.color_select", text="Deselect").deselect = True
+ # stroke color
+ ma = None
+ if is_view3d and brush is not None:
+ gp_settings = brush.gpencil_settings
+ if gp_settings.use_material_pin is False:
+ ma = ob.material_slots[ob.active_material_index].material
+ else:
+ ma = gp_settings.material
+
+ if ma is not None and ma.grease_pencil is not None:
+ gpcolor = ma.grease_pencil
+ if gpcolor.stroke_style == 'SOLID' or \
+ gpcolor.use_stroke_pattern is True or \
+ gpcolor.use_stroke_texture_mix is True:
+ row = layout.row()
+ row.prop(gpcolor, "color", text="Stroke Color")
else:
space = context.space_data