forked from bartvdbraak/blender
Cleanup: use row() sub-layout to expand enum properties horizontaly
This commit is contained in:
parent
528ae8885e
commit
d5d7455796
@ -37,7 +37,7 @@ class MotionPathButtonsPanel:
|
||||
mps = avs.motion_path
|
||||
|
||||
# Display Range
|
||||
layout.prop(mps, "type", expand=True)
|
||||
layout.row().prop(mps, "type", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -120,7 +120,7 @@ class OnionSkinButtonsPanel:
|
||||
|
||||
arm = context.armature
|
||||
|
||||
layout.prop(arm, "ghost_type", expand=True)
|
||||
layout.row().prop(arm, "ghost_type", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
@ -57,7 +57,7 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, Panel):
|
||||
|
||||
arm = context.armature
|
||||
|
||||
layout.prop(arm, "pose_position", expand=True)
|
||||
layout.row().prop(arm, "pose_position", expand=True)
|
||||
|
||||
col = layout.column()
|
||||
col.label(text="Layers:")
|
||||
@ -80,7 +80,7 @@ class DATA_PT_display(ArmatureButtonsPanel, Panel):
|
||||
ob = context.object
|
||||
arm = context.armature
|
||||
|
||||
layout.prop(arm, "draw_type", expand=True)
|
||||
layout.row().prop(arm, "draw_type", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -215,7 +215,7 @@ class DATA_PT_ghost(ArmatureButtonsPanel, Panel):
|
||||
|
||||
arm = context.armature
|
||||
|
||||
layout.prop(arm, "ghost_type", expand=True)
|
||||
layout.row().prop(arm, "ghost_type", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -252,11 +252,11 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
|
||||
layout.prop(ob.pose, "ik_solver")
|
||||
|
||||
if itasc:
|
||||
layout.prop(itasc, "mode", expand=True)
|
||||
layout.row().prop(itasc, "mode", expand=True)
|
||||
simulation = (itasc.mode == 'SIMULATION')
|
||||
if simulation:
|
||||
layout.label(text="Reiteration:")
|
||||
layout.prop(itasc, "reiteration_method", expand=True)
|
||||
layout.row().prop(itasc, "reiteration_method", expand=True)
|
||||
|
||||
row = layout.row()
|
||||
row.active = not simulation or itasc.reiteration_method != 'NEVER'
|
||||
|
@ -79,7 +79,7 @@ class DATA_PT_lens(CameraButtonsPanel, Panel):
|
||||
|
||||
cam = context.camera
|
||||
|
||||
layout.prop(cam, "type", expand=True)
|
||||
layout.row().prop(cam, "type", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
@ -371,10 +371,10 @@ class DATA_PT_paragraph(CurveButtonsPanelText, Panel):
|
||||
text = context.curve
|
||||
|
||||
layout.label(text="Horizontal Alignment:")
|
||||
layout.prop(text, "align_x", expand=True)
|
||||
layout.row().prop(text, "align_x", expand=True)
|
||||
|
||||
layout.label(text="Vertical Alignment:")
|
||||
layout.prop(text, "align_y", expand=True)
|
||||
layout.row().prop(text, "align_y", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
@ -83,7 +83,7 @@ class DATA_PT_lamp(DataButtonsPanel, Panel):
|
||||
|
||||
lamp = context.lamp
|
||||
|
||||
layout.prop(lamp, "type", expand=True)
|
||||
layout.row().prop(lamp, "type", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -210,7 +210,7 @@ class DATA_PT_shadow(DataButtonsPanel, Panel):
|
||||
|
||||
lamp = context.lamp
|
||||
|
||||
layout.prop(lamp, "shadow_method", expand=True)
|
||||
layout.row().prop(lamp, "shadow_method", expand=True)
|
||||
|
||||
if lamp.shadow_method == 'NOSHADOW' and lamp.type == 'AREA':
|
||||
split = layout.split()
|
||||
|
@ -70,7 +70,7 @@ class DATA_PT_metaball(DataButtonsPanel, Panel):
|
||||
col.prop(mball, "threshold", text="Threshold")
|
||||
|
||||
layout.label(text="Update:")
|
||||
layout.prop(mball, "update_method", expand=True)
|
||||
layout.row().prop(mball, "update_method", expand=True)
|
||||
|
||||
|
||||
class DATA_PT_mball_texture_space(DataButtonsPanel, Panel):
|
||||
|
@ -343,7 +343,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, Panel):
|
||||
stereo_mode = gs.stereo
|
||||
|
||||
# stereo options:
|
||||
layout.prop(gs, "stereo", expand=True)
|
||||
layout.row().prop(gs, "stereo", expand=True)
|
||||
|
||||
# stereo:
|
||||
if stereo_mode == 'STEREO':
|
||||
@ -392,7 +392,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel, Panel):
|
||||
|
||||
gs = context.scene.game_settings
|
||||
|
||||
layout.prop(gs, "material_mode", expand=True)
|
||||
layout.row().prop(gs, "material_mode", expand=True)
|
||||
|
||||
if gs.material_mode == 'GLSL':
|
||||
split = layout.split()
|
||||
|
@ -233,7 +233,7 @@ class GreasePencilStrokeEditPanel:
|
||||
|
||||
if is_3d_view:
|
||||
layout.separator()
|
||||
|
||||
|
||||
|
||||
layout.separator()
|
||||
col = layout.column(align=True)
|
||||
@ -884,9 +884,9 @@ class GreasePencilDataPanel:
|
||||
|
||||
# Owner Selector
|
||||
if context.space_data.type == 'VIEW_3D':
|
||||
layout.prop(context.tool_settings, "grease_pencil_source", expand=True)
|
||||
layout.row().prop(context.tool_settings, "grease_pencil_source", expand=True)
|
||||
elif context.space_data.type == 'CLIP_EDITOR':
|
||||
layout.prop(context.space_data, "grease_pencil_source", expand=True)
|
||||
layout.row().prop(context.space_data, "grease_pencil_source", expand=True)
|
||||
|
||||
# Grease Pencil data selector
|
||||
layout.template_ID(gpd_owner, "grease_pencil", new="gpencil.data_add", unlink="gpencil.data_unlink")
|
||||
@ -963,7 +963,7 @@ class GreasePencilDataPanel:
|
||||
row.prop(gpl, "line_change", text="Thickness Change", slider=True)
|
||||
row.operator("gpencil.stroke_apply_thickness", icon='STYLUS_PRESSURE', text="")
|
||||
|
||||
# Parenting
|
||||
# Parenting
|
||||
if context.space_data.type == 'VIEW_3D':
|
||||
col = split.column(align=True)
|
||||
col.label(text="Parent:")
|
||||
|
@ -170,7 +170,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
|
||||
split.separator()
|
||||
|
||||
if mat:
|
||||
layout.prop(mat, "type", expand=True)
|
||||
layout.row().prop(mat, "type", expand=True)
|
||||
if mat.use_nodes:
|
||||
row = layout.row()
|
||||
row.label(text="", icon='NODETREE')
|
||||
@ -991,7 +991,7 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel, Panel):
|
||||
|
||||
mat = context.material # don't use node material
|
||||
|
||||
layout.prop(mat, "transparency_method", expand=True)
|
||||
layout.row().prop(mat, "transparency_method", expand=True)
|
||||
|
||||
|
||||
class MATERIAL_PT_volume_integration(VolumeButtonsPanel, Panel):
|
||||
|
@ -294,7 +294,7 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
|
||||
|
||||
ob = context.object
|
||||
|
||||
layout.prop(ob, "dupli_type", expand=True)
|
||||
layout.row().prop(ob, "dupli_type", expand=True)
|
||||
|
||||
if ob.dupli_type == 'FRAMES':
|
||||
split = layout.split()
|
||||
|
@ -284,7 +284,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
|
||||
col.prop(part, "lifetime_random", slider=True)
|
||||
|
||||
layout.label(text="Emit From:")
|
||||
layout.prop(part, "emit_from", expand=True)
|
||||
layout.row().prop(part, "emit_from", expand=True)
|
||||
|
||||
row = layout.row()
|
||||
if part.emit_from == 'VERT':
|
||||
@ -297,7 +297,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
|
||||
row.prop(part, "use_even_distribution")
|
||||
|
||||
if part.emit_from == 'FACE' or part.emit_from == 'VOLUME':
|
||||
layout.prop(part, "distribution", expand=True)
|
||||
layout.row().prop(part, "distribution", expand=True)
|
||||
|
||||
row = layout.row()
|
||||
if part.distribution == 'JIT':
|
||||
@ -578,7 +578,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
|
||||
|
||||
layout.enabled = particle_panel_enabled(context, psys)
|
||||
|
||||
layout.prop(part, "physics_type", expand=True)
|
||||
layout.row().prop(part, "physics_type", expand=True)
|
||||
|
||||
row = layout.row()
|
||||
col = row.column(align=True)
|
||||
@ -785,7 +785,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
|
||||
sub.prop(key, "object", text="")
|
||||
sub.prop(key, "system", text="System")
|
||||
|
||||
layout.prop(key, "alliance", expand=True)
|
||||
layout.row().prop(key, "alliance", expand=True)
|
||||
elif part.physics_type == 'FLUID':
|
||||
sub = row.row()
|
||||
# doesn't work yet
|
||||
@ -933,7 +933,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
|
||||
col.prop(part, "show_unborn")
|
||||
col.prop(part, "use_dead")
|
||||
|
||||
layout.prop(part, "render_type", expand=True)
|
||||
layout.row().prop(part, "render_type", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
@ -68,7 +68,7 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
|
||||
|
||||
md = context.dynamic_paint
|
||||
|
||||
layout.prop(md, "ui_type", expand=True)
|
||||
layout.row().prop(md, "ui_type", expand=True)
|
||||
|
||||
if md.ui_type == 'CANVAS':
|
||||
canvas = md.canvas_settings
|
||||
@ -363,7 +363,7 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
|
||||
canvas = context.dynamic_paint.canvas_settings
|
||||
surface = canvas.canvas_surfaces.active
|
||||
|
||||
layout.prop(surface, "effect_ui", expand=True)
|
||||
layout.row().prop(surface, "effect_ui", expand=True)
|
||||
|
||||
if surface.effect_ui == 'SPREAD':
|
||||
layout.prop(surface, "use_spread")
|
||||
|
@ -128,7 +128,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
|
||||
if field.type not in {'NONE', 'GUIDE'}:
|
||||
|
||||
layout.label(text="Falloff:")
|
||||
layout.prop(field, "falloff_type", expand=True)
|
||||
layout.row().prop(field, "falloff_type", expand=True)
|
||||
|
||||
basic_force_field_falloff_ui(self, context, field)
|
||||
|
||||
|
@ -52,7 +52,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
|
||||
md = context.smoke
|
||||
ob = context.object
|
||||
|
||||
layout.prop(md, "smoke_type", expand=True)
|
||||
layout.row().prop(md, "smoke_type", expand=True)
|
||||
|
||||
if md.smoke_type == 'DOMAIN':
|
||||
domain = md.domain_settings
|
||||
@ -322,14 +322,14 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
|
||||
|
||||
if cache_file_format == 'POINTCACHE':
|
||||
layout.label(text="Compression:")
|
||||
layout.prop(domain, "point_cache_compress_type", expand=True)
|
||||
layout.row().prop(domain, "point_cache_compress_type", expand=True)
|
||||
elif cache_file_format == 'OPENVDB':
|
||||
if not bpy.app.build_options.openvdb:
|
||||
layout.label("Built without OpenVDB support")
|
||||
return
|
||||
|
||||
layout.label(text="Compression:")
|
||||
layout.prop(domain, "openvdb_cache_compress_type", expand=True)
|
||||
layout.row().prop(domain, "openvdb_cache_compress_type", expand=True)
|
||||
row = layout.row()
|
||||
row.label("Data Depth:")
|
||||
row.prop(domain, "data_depth", expand=True, text="Data Depth")
|
||||
|
@ -191,7 +191,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
|
||||
layout.active = softbody.use_self_collision and softbody_panel_enabled(md)
|
||||
|
||||
layout.label(text="Collision Ball Size Calculation:")
|
||||
layout.prop(softbody, "collision_type", expand=True)
|
||||
layout.row().prop(softbody, "collision_type", expand=True)
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Ball:")
|
||||
|
@ -165,7 +165,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
|
||||
pin_id = None
|
||||
|
||||
if not space.use_pin_id:
|
||||
layout.prop(space, "texture_context", expand=True)
|
||||
layout.row().prop(space, "texture_context", expand=True)
|
||||
pin_id = None
|
||||
|
||||
if space.texture_context == 'OTHER':
|
||||
@ -318,9 +318,9 @@ class TEXTURE_PT_clouds(TextureTypePanel, Panel):
|
||||
|
||||
tex = context.texture
|
||||
|
||||
layout.prop(tex, "cloud_type", expand=True)
|
||||
layout.row().prop(tex, "cloud_type", expand=True)
|
||||
layout.label(text="Noise:")
|
||||
layout.prop(tex, "noise_type", text="Type", expand=True)
|
||||
layout.row().prop(tex, "noise_type", text="Type", expand=True)
|
||||
layout.prop(tex, "noise_basis", text="Basis")
|
||||
|
||||
split = layout.split()
|
||||
@ -342,8 +342,8 @@ class TEXTURE_PT_wood(TextureTypePanel, Panel):
|
||||
|
||||
tex = context.texture
|
||||
|
||||
layout.prop(tex, "noise_basis_2", expand=True)
|
||||
layout.prop(tex, "wood_type", expand=True)
|
||||
layout.row().prop(tex, "noise_basis_2", expand=True)
|
||||
layout.row().prop(tex, "wood_type", expand=True)
|
||||
|
||||
col = layout.column()
|
||||
col.active = tex.wood_type in {'RINGNOISE', 'BANDNOISE'}
|
||||
@ -371,10 +371,10 @@ class TEXTURE_PT_marble(TextureTypePanel, Panel):
|
||||
|
||||
tex = context.texture
|
||||
|
||||
layout.prop(tex, "marble_type", expand=True)
|
||||
layout.prop(tex, "noise_basis_2", expand=True)
|
||||
layout.row().prop(tex, "marble_type", expand=True)
|
||||
layout.row().prop(tex, "noise_basis_2", expand=True)
|
||||
layout.label(text="Noise:")
|
||||
layout.prop(tex, "noise_type", text="Type", expand=True)
|
||||
layout.row().prop(tex, "noise_type", text="Type", expand=True)
|
||||
layout.prop(tex, "noise_basis", text="Basis")
|
||||
|
||||
split = layout.split()
|
||||
@ -431,9 +431,9 @@ class TEXTURE_PT_stucci(TextureTypePanel, Panel):
|
||||
|
||||
tex = context.texture
|
||||
|
||||
layout.prop(tex, "stucci_type", expand=True)
|
||||
layout.row().prop(tex, "stucci_type", expand=True)
|
||||
layout.label(text="Noise:")
|
||||
layout.prop(tex, "noise_type", text="Type", expand=True)
|
||||
layout.row().prop(tex, "noise_type", text="Type", expand=True)
|
||||
layout.prop(tex, "noise_basis", text="Basis")
|
||||
|
||||
row = layout.row()
|
||||
@ -808,7 +808,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel):
|
||||
tex = context.texture
|
||||
pd = tex.point_density
|
||||
|
||||
layout.prop(pd, "point_source", expand=True)
|
||||
layout.row().prop(pd, "point_source", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
@ -175,7 +175,7 @@ class WORLD_PT_gather(WorldButtonsPanel, Panel):
|
||||
|
||||
layout.active = light.use_ambient_occlusion or light.use_environment_light or light.use_indirect_light
|
||||
|
||||
layout.prop(light, "gather_method", expand=True)
|
||||
layout.row().prop(light, "gather_method", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
@ -80,7 +80,7 @@ class USERPREF_PT_tabs(Panel):
|
||||
|
||||
userpref = context.user_preferences
|
||||
|
||||
layout.prop(userpref, "active_section", expand=True)
|
||||
layout.row().prop(userpref, "active_section", expand=True)
|
||||
|
||||
|
||||
class USERPREF_MT_interaction_presets(Menu):
|
||||
|
@ -3534,7 +3534,7 @@ class VIEW3D_PT_view3d_meshstatvis(Panel):
|
||||
row = layout.row(align=True)
|
||||
row.prop(statvis, "overhang_min", text="")
|
||||
row.prop(statvis, "overhang_max", text="")
|
||||
layout.prop(statvis, "overhang_axis", expand=True)
|
||||
layout.row().prop(statvis, "overhang_axis", expand=True)
|
||||
elif statvis_type == 'THICKNESS':
|
||||
row = layout.row(align=True)
|
||||
row.prop(statvis, "thickness_min", text="")
|
||||
|
@ -967,9 +967,9 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
||||
col.prop(brush, "steps", slider=True)
|
||||
col.prop(settings, "default_key_count", slider=True)
|
||||
elif tool == 'LENGTH':
|
||||
layout.prop(brush, "length_mode", expand=True)
|
||||
layout.row().prop(brush, "length_mode", expand=True)
|
||||
elif tool == 'PUFF':
|
||||
layout.prop(brush, "puff_mode", expand=True)
|
||||
layout.row().prop(brush, "puff_mode", expand=True)
|
||||
layout.prop(brush, "use_puff_volume")
|
||||
|
||||
# Sculpt Mode #
|
||||
|
Loading…
Reference in New Issue
Block a user