[Bf-blender-cvs] [a9786549776] blender2.8: UI: use property split for UV mask panel
Campbell Barton
noreply at git.blender.org
Sun Jun 10 16:42:51 CEST 2018
Commit: a978654977603839a8e6dcd290bf69a39ed946aa
Author: Campbell Barton
Date: Sun Jun 10 16:29:55 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBa978654977603839a8e6dcd290bf69a39ed946aa
UI: use property split for UV mask panel
===================================================================
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 1550b661971..1cacba82b3e 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -610,6 +610,7 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
toolsettings = context.tool_settings
ipaint = toolsettings.image_paint
@@ -620,17 +621,23 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
col.active = ipaint.use_stencil_layer
stencil_text = mesh.uv_layer_stencil.name if mesh.uv_layer_stencil else ""
- col.label("UV Map")
- col.menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False)
+ split = col.split(0.5)
+ colsub = split.column()
+ colsub.alignment = 'RIGHT'
+ colsub.label("UV Layer")
+ split.column().menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False)
- col.label("Stencil Image:")
# todo this should be combinded into a single row
- col.template_ID(ipaint, "stencil_image", open="image.open")
- col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
+ split = col.split(0.5)
+ colsub = split.column()
+ colsub.alignment = 'RIGHT'
+ colsub.label("Stencil Image")
+ colsub = split.column()
+ colsub.template_ID(ipaint, "stencil_image", open="image.open")
+ colsub.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
- col.label("Visualization:")
row = col.row(align=True)
- row.prop(ipaint, "stencil_color", text="")
+ row.prop(ipaint, "stencil_color", text="Display Color")
row.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA')
More information about the Bf-blender-cvs
mailing list