Cleanup: use row() sub-layout to expand enum properties horizontaly
authorraa <roaoao@gmail.com>
Thu, 1 Jun 2017 13:38:32 +0000 (16:38 +0300)
committerraa <roaoao@gmail.com>
Thu, 1 Jun 2017 13:54:45 +0000 (16:54 +0300)
20 files changed:
release/scripts/startup/bl_ui/properties_animviz.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_data_camera.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_data_lamp.py
release/scripts/startup/bl_ui/properties_data_metaball.py
release/scripts/startup/bl_ui/properties_game.py
release/scripts/startup/bl_ui/properties_grease_pencil_common.py
release/scripts/startup/bl_ui/properties_material.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
release/scripts/startup/bl_ui/properties_physics_field.py
release/scripts/startup/bl_ui/properties_physics_smoke.py
release/scripts/startup/bl_ui/properties_physics_softbody.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/properties_world.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py

index 84bae18dd6fa320ebc21a9b2482da3e24e9f1469..43c01822b58531512cec235c8a09d12df36bf8a7 100644 (file)
@@ -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()
 
index a2ecf984eb5a36cf47f96f44b67db04af929c06f..8d3ab24b4cff8c814cc90b383cf95eac47e93669 100644 (file)
@@ -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'
index 101062095c4576d23e955ea0e1365cc27dc45e35..14286045704fac6be25255c427fa22d0764b8edf 100644 (file)
@@ -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()
 
index ac1eb9505a6dd4e6bd03037226f65597a401b808..3a3ad31a8ef9b29074367f86ae28d5a103025b66 100644 (file)
@@ -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()
 
index f913ef5138126bcd196e66d1c75e3682e63f01e9..98aa31ac915ab1083d712d3130fb301219c92c8e 100644 (file)
@@ -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()
index a621dc7210f172cb52f00e1b3ae920bb64f2b88c..dd62c4523b168eb9353435b0fbad5c22c6218f12 100644 (file)
@@ -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):
index 46b34373aa5b6621373f67ec3bf730e4f64ccbc6..636a9707ab9887653d02ca7003f60a9074b8dac6 100644 (file)
@@ -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()
index 42e8d5272b3c2f1f21d24aeff02b8b5519c51164..52835a00796e1c78ed8e26548aaa86a00aa8ab3a 100644 (file)
@@ -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:")
index 06ae1847d06ec76f7510455c194f417597e31fc9..dc82bb0d69b60897fddb6ec64c7b3e2496f9c49a 100644 (file)
@@ -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):
index d7e18f812322c053d082fb5a6b108c40b022b1fe..43c8300b558ab0ea73a5dca787bd1aeda6d1cfee 100644 (file)
@@ -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()
index e86df975927b6210184d93a159ed77e9ceda4724..23e7c0a67878388d51f0aae9783b02c87474c1d2 100644 (file)
@@ -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()
 
index c813350be08813ff550c819e3cbb30237d4f512f..cf1d4f38038d9c3e1a0776534633b2a182901df6 100644 (file)
@@ -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")
index 2b12fcf982d593540af7754e7ab9d1d39a75eeb5..3fd47f0b8caf601f8c9413960928b2a40836da83 100644 (file)
@@ -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)
 
index f2e6c1e22e3ab0b6c8d2c50e8e622f5f1b4f685a..4f0d36808340df71de458c14ccdbd85d209998fa 100644 (file)
@@ -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")
index 5960428e4aed2cbec3ad23532999b6b1a4ac1f81..5ce4302891d61c968ca97522d685142b55e897ba 100644 (file)
@@ -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:")
index d05527b7ef646a961420c92984df7b796b277f26..880684997bfa345b8e42d0a43b4c318ffc418fa3 100644 (file)
@@ -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()
 
index 6aa39580d3409846c9a3d75e69e493961e53ade7..107c31567b3ddcba02d73fa92a265d42fdeb7b34 100644 (file)
@@ -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()
 
index 5ed481a215a44c37a24d3178cd81369bb8225c25..dad8ca73dce0c504bc3d1303d58d03e8c96abe97 100644 (file)
@@ -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):
index 9245def7473244fc80e5f20d708a3551413cacc3..47c94cefe1678e16e0f3646ee746a5569b74bb15 100644 (file)
@@ -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="")
index d58453deaef102db14eeddb8ee0ffd96e982701a..2e291d3d471535871e6fd1fdceb32476ff0c63b1 100644 (file)
@@ -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 #