[Bf-blender-cvs] [ce54157417d] temp-checkbox-layout-tweaks: Use property split layout for sculpt symmetry options
Julian Eisel
noreply at git.blender.org
Sat Apr 11 22:59:50 CEST 2020
Commit: ce54157417d32108005d7be27d349513304cc52d
Author: Julian Eisel
Date: Sat Apr 11 22:18:07 2020 +0200
Branches: temp-checkbox-layout-tweaks
https://developer.blender.org/rBce54157417d32108005d7be27d349513304cc52d
Use property split layout for sculpt symmetry options
Meant as an example of how to do this with Python. Wasn't possible
without a broken layout until the previous commit.
===================================================================
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 993b0038529..d4799f1c609 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -954,51 +954,32 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
sculpt = context.tool_settings.sculpt
- split = layout.split()
-
- col = split.column()
- col.alignment = 'RIGHT'
- col.label(text="Mirror")
-
- col = split.column()
+ col = layout.column(heading="Mirror")
row = col.row(align=True)
row.prop(sculpt, "use_symmetry_x", text="X", toggle=True)
row.prop(sculpt, "use_symmetry_y", text="Y", toggle=True)
row.prop(sculpt, "use_symmetry_z", text="Z", toggle=True)
- split = layout.split()
-
- col = split.column()
- col.alignment = 'RIGHT'
- col.label(text="Lock")
-
- col = split.column()
+ col = layout.column(heading="Lock")
row = col.row(align=True)
row.prop(sculpt, "lock_x", text="X", toggle=True)
row.prop(sculpt, "lock_y", text="Y", toggle=True)
row.prop(sculpt, "lock_z", text="Z", toggle=True)
- split = layout.split()
-
- col = split.column()
- col.alignment = 'RIGHT'
- col.label(text="Tiling")
-
- col = split.column()
+ col = layout.column(heading="Tiling")
row = col.row(align=True)
row.prop(sculpt, "tile_x", text="X", toggle=True)
row.prop(sculpt, "tile_y", text="Y", toggle=True)
row.prop(sculpt, "tile_z", text="Z", toggle=True)
- layout.use_property_split = True
- layout.use_property_decorate = False
-
layout.prop(sculpt, "use_symmetry_feather", text="Feather")
layout.column().prop(sculpt, "radial_symmetry", text="Radial")
layout.column().prop(sculpt, "tile_offset", text="Tile Offset")
More information about the Bf-blender-cvs
mailing list