UI: remove hack to align search properties

This commit is contained in:
Campbell Barton
2018-08-24 10:51:53 +10:00
parent 5bd731b673
commit bae8ab3188
5 changed files with 16 additions and 65 deletions

View File

@@ -95,11 +95,9 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
key = ob.data.shape_keys
if key:
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.active = not cloth.use_dynamic_mesh
row.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="Rest Shape Key")
row.label(text="", icon='BLANK1')
class PHYSICS_PT_cloth_pinning(PhysicButtonsPanel, Panel):
@@ -129,10 +127,7 @@ class PHYSICS_PT_cloth_pinning(PhysicButtonsPanel, Panel):
col = flow.column()
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="Mass Group")
row.label(text="", icon='BLANK1')
col.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="Mass Group")
col = flow.column()
col.prop(cloth, "pin_stiffness", text="Stiffness")
@@ -221,10 +216,7 @@ class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel):
col.prop(cloth, "self_distance_min", slider=True, text="Distance")
col = flow.column()
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="Vertex Group")
row.label(text="", icon='BLANK1')
col.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="Vertex Group")
class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
@@ -252,24 +244,19 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
col = flow.column()
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(
col.prop_search(
cloth, "vertex_group_structural_stiffness", ob, "vertex_groups",
text="Structural Group"
)
row.label(text="", icon='BLANK1')
col.prop(cloth, "structural_stiffness_max", text="Max")
col.separator()
col = flow.column()
row = col.row(align=True)
row.prop_search(
col.prop_search(
cloth, "vertex_group_bending", ob, "vertex_groups",
text="Bending Group"
)
row.label(text="", icon='BLANK1')
col.prop(cloth, "bending_stiffness_max", text="Max")
@@ -302,10 +289,7 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
col.separator()
col = col.column()
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(cloth, "vertex_group_shrink", ob, "vertex_groups", text="Shrinking Group")
row.label(text="", icon='BLANK1')
col.prop_search(cloth, "vertex_group_shrink", ob, "vertex_groups", text="Shrinking Group")
col = flow.column(align=True)
col.prop(cloth, "shrink_min", text="Min")

View File

@@ -397,10 +397,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
col = flow.column()
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(surface, "uv_layer", ob.data, "uv_layers", text="UV Map")
row.label(text="", icon='BLANK1')
col.prop_search(surface, "uv_layer", ob.data, "uv_layers", text="UV Map")
col = flow.column()
col.prop(surface, "image_fileformat")
@@ -539,16 +536,10 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel):
elif surface.init_color_type == 'TEXTURE':
col.prop(surface, "init_texture")
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(surface, "init_layername", ob.data, "uv_layers", text="UV Map")
row.label(text="", icon='BLANK1')
col.prop_search(surface, "init_layername", ob.data, "uv_layers", text="UV Map")
elif surface.init_color_type == 'VERTEX_COLOR':
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(surface, "init_layername", ob.data, "vertex_colors", text="Color Layer")
row.label(text="", icon='BLANK1')
col.prop_search(surface, "init_layername", ob.data, "vertex_colors", text="Color Layer")
class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
@@ -742,10 +733,7 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
col.separator()
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(brush, "particle_system", ob, "particle_systems")
row.label(text="", icon='BLANK1')
col.prop_search(brush, "particle_system", ob, "particle_systems")
if brush.particle_system:
col = flow.column()

View File

@@ -123,13 +123,10 @@ class PHYSICS_PT_smoke_settings(PhysicButtonsPanel, Panel):
col.prop(flow_smoke, "smoke_flow_source", expand=False, text="Flow Source")
if flow_smoke.smoke_flow_source == 'PARTICLES':
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(
col.prop_search(
flow_smoke, "particle_system", ob, "particle_systems",
text="Particle System"
)
row.label(text="", icon='BLANK1')
else:
col.prop(flow_smoke, "surface_distance")
col.prop(flow_smoke, "volume_density")
@@ -153,10 +150,7 @@ class PHYSICS_PT_smoke_settings(PhysicButtonsPanel, Panel):
col.separator()
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(flow_smoke, "density_vertex_group", ob, "vertex_groups", text="Vertex Group")
row.label(text="", icon='BLANK1')
col.prop_search(flow_smoke, "density_vertex_group", ob, "vertex_groups", text="Vertex Group")
elif md.smoke_type == 'COLLISION':
coll = md.coll_settings
@@ -349,10 +343,7 @@ class PHYSICS_PT_smoke_flow_texture(PhysicButtonsPanel, Panel):
sub.active = flow_smoke.use_texture
if flow_smoke.texture_map_type == 'UV':
# Note: TODO prop_search doesn't align on the right.
row = sub.row(align=True)
row.prop_search(flow_smoke, "uv_layer", ob.data, "uv_layers")
row.label(text="", icon='BLANK1')
sub.prop_search(flow_smoke, "uv_layer", ob.data, "uv_layers")
if flow_smoke.texture_map_type == 'AUTO':
sub.prop(flow_smoke, "texture_size")

View File

@@ -84,10 +84,7 @@ class PHYSICS_PT_softbody_object(PhysicButtonsPanel, Panel):
col = flow.column()
col.prop(softbody, "mass")
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text="Control Point")
row.label(text="", icon='BLANK1')
col.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text="Control Point")
class PHYSICS_PT_softbody_simulation(PhysicButtonsPanel, Panel):
@@ -141,10 +138,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
layout.active = softbody.use_goal and softbody_panel_enabled(md)
# Note: TODO prop_search doesn't align on the right.
row = layout.row(align=True)
row.prop_search(softbody, "vertex_group_goal", ob, "vertex_groups", text="Vertex Group")
row.label(text="", icon='BLANK1')
layout.prop_search(softbody, "vertex_group_goal", ob, "vertex_groups", text="Vertex Group")
class PHYSICS_PT_softbody_goal_strenghts(PhysicButtonsPanel, Panel):
@@ -221,10 +215,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
col = flow.column()
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(softbody, "vertex_group_spring", ob, "vertex_groups", text="Springs")
row.label(text="", icon='BLANK1')
col.prop_search(softbody, "vertex_group_spring", ob, "vertex_groups", text="Springs")
col.separator()

View File

@@ -738,10 +738,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
ob = context.object
if ob and ob.type == 'MESH':
# Note: TODO prop_search doesn't align on the right.
row = col.row(align=True)
row.prop_search(tex, "uv_layer", ob.data, "uv_layers", text="Map")
row.label(text="", icon='BLANK1')
col.prop_search(tex, "uv_layer", ob.data, "uv_layers", text="Map")
else:
col.prop(tex, "uv_layer", text="Map")