From 2577bfddfdb8de24ccc807db8ed1c25465b407b9 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Thu, 19 Nov 2009 13:26:51 +0000 Subject: [PATCH] Renamed "col2" to "wide_ui" which is more meaningful. --- .../scripts/ui/properties_data_armature.py | 32 +-- release/scripts/ui/properties_data_bone.py | 18 +- release/scripts/ui/properties_data_camera.py | 18 +- release/scripts/ui/properties_data_curve.py | 38 +-- release/scripts/ui/properties_data_empty.py | 4 +- release/scripts/ui/properties_data_lamp.py | 42 ++-- release/scripts/ui/properties_data_lattice.py | 12 +- release/scripts/ui/properties_data_mesh.py | 16 +- .../scripts/ui/properties_data_metaball.py | 16 +- .../scripts/ui/properties_data_modifier.py | 126 +++++----- release/scripts/ui/properties_game.py | 62 ++--- release/scripts/ui/properties_material.py | 92 +++---- release/scripts/ui/properties_object.py | 36 +-- .../ui/properties_object_constraint.py | 236 +++++++++--------- .../scripts/ui/properties_physics_cloth.py | 14 +- .../scripts/ui/properties_physics_common.py | 20 +- .../scripts/ui/properties_physics_field.py | 24 +- .../scripts/ui/properties_physics_fluid.py | 32 +-- .../scripts/ui/properties_physics_smoke.py | 20 +- .../scripts/ui/properties_physics_softbody.py | 22 +- release/scripts/ui/properties_render.py | 54 ++-- release/scripts/ui/properties_scene.py | 20 +- release/scripts/ui/properties_texture.py | 108 ++++---- release/scripts/ui/properties_world.py | 24 +- release/scripts/ui/space_image.py | 16 +- 25 files changed, 551 insertions(+), 551 deletions(-) diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py index 1f75c7658e3..a5db2bbd1a3 100644 --- a/release/scripts/ui/properties_data_armature.py +++ b/release/scripts/ui/properties_data_armature.py @@ -41,9 +41,9 @@ class DATA_PT_context_arm(DataButtonsPanel): ob = context.object arm = context.armature space = context.space_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split(percentage=0.65) if ob: split.template_ID(ob, "data") @@ -62,7 +62,7 @@ class DATA_PT_skeleton(DataButtonsPanel): layout = self.layout arm = context.armature - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(arm, "pose_position", expand=True) @@ -74,7 +74,7 @@ class DATA_PT_skeleton(DataButtonsPanel): col.itemL(text="Protected Layers:") col.itemR(arm, "layer_protection", text="") - if col2: + if wide_ui: col = split.column() col.itemL(text="Deform:") col.itemR(arm, "deform_vertexgroups", text="Vertex Groups") @@ -90,9 +90,9 @@ class DATA_PT_display(DataButtonsPanel): layout = self.layout arm = context.armature - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.row().itemR(arm, "drawtype", expand=True) else: layout.row().itemR(arm, "drawtype", text="") @@ -104,7 +104,7 @@ class DATA_PT_display(DataButtonsPanel): col.itemR(arm, "draw_axes", text="Axes") col.itemR(arm, "draw_custom_bone_shapes", text="Shapes") - if col2: + if wide_ui: col = split.column() col.itemR(arm, "draw_group_colors", text="Colors") col.itemR(arm, "delay_deform", text="Delay Refresh") @@ -121,7 +121,7 @@ class DATA_PT_bone_groups(DataButtonsPanel): ob = context.object pose = ob.pose - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui row = layout.row() row.template_list(pose, "bone_groups", pose, "active_bone_group_index", rows=2) @@ -143,7 +143,7 @@ class DATA_PT_bone_groups(DataButtonsPanel): col = split.column() col.itemR(group, "color_set") if group.color_set: - if col2: + if wide_ui: col = split.column() col.template_triColorSet(group, "colors") @@ -163,9 +163,9 @@ class DATA_PT_paths(DataButtonsPanel): layout = self.layout arm = context.armature - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(arm, "paths_type", expand=True) else: layout.itemR(arm, "paths_type", text="") @@ -184,7 +184,7 @@ class DATA_PT_paths(DataButtonsPanel): sub.itemR(arm, "path_size", text="Step") col.row().itemR(arm, "paths_location", expand=True) - if col2: + if wide_ui: col = split.column() col.itemL(text="Display:") col.itemR(arm, "paths_show_frame_numbers", text="Frame Numbers") @@ -198,7 +198,7 @@ class DATA_PT_paths(DataButtonsPanel): col = split.column() col.itemO("pose.paths_calculate", text="Calculate Paths") - if col2: + if wide_ui: col = split.column() col.itemO("pose.paths_clear", text="Clear Paths") @@ -210,9 +210,9 @@ class DATA_PT_ghost(DataButtonsPanel): layout = self.layout arm = context.armature - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(arm, "ghost_type", expand=True) else: layout.itemR(arm, "ghost_type", text="") @@ -230,7 +230,7 @@ class DATA_PT_ghost(DataButtonsPanel): sub.itemR(arm, "ghost_step", text="Range") sub.itemR(arm, "ghost_size", text="Step") - if col2: + if wide_ui: col = split.column() col.itemL(text="Display:") col.itemR(arm, "ghost_only_selected", text="Selected Only") diff --git a/release/scripts/ui/properties_data_bone.py b/release/scripts/ui/properties_data_bone.py index cd1ccd60464..0770942a6ea 100644 --- a/release/scripts/ui/properties_data_bone.py +++ b/release/scripts/ui/properties_data_bone.py @@ -55,11 +55,11 @@ class BONE_PT_transform(BoneButtonsPanel): ob = context.object bone = context.bone - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui if not bone: bone = context.edit_bone - if col2: + if wide_ui: row = layout.row() row.column().itemR(bone, "head") row.column().itemR(bone, "tail") @@ -80,7 +80,7 @@ class BONE_PT_transform(BoneButtonsPanel): else: pchan = ob.pose.bones[context.bone.name] - if col2: + if wide_ui: row = layout.row() col = row.column() col.itemR(pchan, "location") @@ -156,7 +156,7 @@ class BONE_PT_relations(BoneButtonsPanel): ob = context.object bone = context.bone arm = context.armature - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui if not bone: bone = context.edit_bone @@ -176,7 +176,7 @@ class BONE_PT_relations(BoneButtonsPanel): col.itemL(text="Bone Group:") col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="") - if col2: + if wide_ui: col = split.column() col.itemL(text="Parent:") if context.bone: @@ -202,7 +202,7 @@ class BONE_PT_display(BoneButtonsPanel): ob = context.object bone = context.bone - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui if not bone: bone = context.edit_bone @@ -218,7 +218,7 @@ class BONE_PT_display(BoneButtonsPanel): col.itemR(bone, "draw_wire", text="Wireframe") col.itemR(bone, "hidden", text="Hide") - if col2: + if wide_ui: col = split.column() col.itemL(text="Custom Shape:") col.itemR(pchan, "custom_shape", text="") @@ -240,7 +240,7 @@ class BONE_PT_deform(BoneButtonsPanel): layout = self.layout bone = context.bone - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui if not bone: bone = context.edit_bone @@ -262,7 +262,7 @@ class BONE_PT_deform(BoneButtonsPanel): sub.itemR(bone, "head_radius", text="Head") sub.itemR(bone, "tail_radius", text="Tail") - if col2: + if wide_ui: col = split.column() col.itemL(text="Curved Bones:") diff --git a/release/scripts/ui/properties_data_camera.py b/release/scripts/ui/properties_data_camera.py index 5dafe57532c..3af875d6239 100644 --- a/release/scripts/ui/properties_data_camera.py +++ b/release/scripts/ui/properties_data_camera.py @@ -41,9 +41,9 @@ class DATA_PT_context_camera(DataButtonsPanel): ob = context.object cam = context.camera space = context.space_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split(percentage=0.65) if ob: split.template_ID(ob, "data") @@ -65,9 +65,9 @@ class DATA_PT_camera(DataButtonsPanel): layout = self.layout cam = context.camera - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(cam, "type", expand=True) else: layout.itemR(cam, "type", text="") @@ -80,7 +80,7 @@ class DATA_PT_camera(DataButtonsPanel): col.itemR(cam, "lens", text="Angle") elif cam.lens_unit == 'DEGREES': col.itemR(cam, "angle") - if col2: + if wide_ui: col = split.column() col.itemR(cam, "lens_unit", text="") @@ -96,7 +96,7 @@ class DATA_PT_camera(DataButtonsPanel): col.itemR(cam, "shift_x", text="X") col.itemR(cam, "shift_y", text="Y") - if col2: + if wide_ui: col = split.column(align=True) col.itemL(text="Clipping:") col.itemR(cam, "clip_start", text="Start") @@ -109,7 +109,7 @@ class DATA_PT_camera(DataButtonsPanel): col = split.column() col.itemR(cam, "dof_object", text="") - if col2: + if wide_ui: col = split.column() col.itemR(cam, "dof_distance", text="Distance") @@ -121,7 +121,7 @@ class DATA_PT_camera_display(DataButtonsPanel): layout = self.layout cam = context.camera - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -131,7 +131,7 @@ class DATA_PT_camera_display(DataButtonsPanel): col.itemR(cam, "show_title_safe", text="Title Safe") col.itemR(cam, "show_name", text="Name") - if col2: + if wide_ui: col = split.column() col.itemR(cam, "draw_size", text="Size") col.itemS() diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py index 63d56fbfa22..8e863c3db31 100644 --- a/release/scripts/ui/properties_data_curve.py +++ b/release/scripts/ui/properties_data_curve.py @@ -56,10 +56,10 @@ class DATA_PT_context_curve(DataButtonsPanel): ob = context.object curve = context.curve space = context.space_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split(percentage=0.65) if ob: @@ -80,7 +80,7 @@ class DATA_PT_shape_curve(DataButtonsPanel): ob = context.object curve = context.curve - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui is_surf = (ob.type == 'SURFACE') is_curve = (ob.type == 'CURVE') is_text = (ob.type == 'TEXT') @@ -104,7 +104,7 @@ class DATA_PT_shape_curve(DataButtonsPanel): col.itemL(text="Display:") col.itemR(curve, "fast", text="Fast Editing") - if col2: + if wide_ui: col = split.column() if is_surf: @@ -132,7 +132,7 @@ class DATA_PT_geometry_curve(DataButtonsPanel): layout = self.layout curve = context.curve - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -143,7 +143,7 @@ class DATA_PT_geometry_curve(DataButtonsPanel): col.itemL(text="Taper Object:") col.itemR(curve, "taper_object", text="") - if col2: + if wide_ui: col = split.column() col.itemL(text="Bevel:") col.itemR(curve, "bevel_depth", text="Depth") @@ -164,7 +164,7 @@ class DATA_PT_pathanim(DataButtonsPanelCurve): layout = self.layout curve = context.curve - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = curve.use_path @@ -172,7 +172,7 @@ class DATA_PT_pathanim(DataButtonsPanelCurve): col = split.column() col.itemR(curve, "path_length", text="Frames") - if col2: + if wide_ui: col = split.column() split = layout.split() @@ -181,7 +181,7 @@ class DATA_PT_pathanim(DataButtonsPanelCurve): col.itemR(curve, "use_path_follow") col.itemR(curve, "use_stretch") - if col2: + if wide_ui: col = split.column() col.itemR(curve, "use_radius") @@ -272,9 +272,9 @@ class DATA_PT_font(DataButtonsPanel): text = context.curve char = context.curve.edit_format - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(text, "font") else: layout.itemR(text, "font", text="") @@ -283,7 +283,7 @@ class DATA_PT_font(DataButtonsPanel): col = split.column() col.itemR(text, "text_size", text="Size") - if col2: + if wide_ui: col = split.column() col.itemR(text, "shear") @@ -293,7 +293,7 @@ class DATA_PT_font(DataButtonsPanel): col.itemL(text="Object Font:") col.itemR(text, "family", text="") - if col2: + if wide_ui: col = split.column() col.itemL(text="Text on Curve:") col.itemR(text, "text_on_curve", text="") @@ -305,7 +305,7 @@ class DATA_PT_font(DataButtonsPanel): col.itemR(text, "ul_position", text="Position") col.itemR(text, "ul_height", text="Thickness") - if col2: + if wide_ui: col = split.column() col.itemL(text="Character:") col.itemR(char, "bold") @@ -325,10 +325,10 @@ class DATA_PT_paragraph(DataButtonsPanel): layout = self.layout text = context.curve - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemL(text="Align:") - if col2: + if wide_ui: layout.itemR(text, "spacemode", expand=True) else: layout.itemR(text, "spacemode", text="") @@ -341,7 +341,7 @@ class DATA_PT_paragraph(DataButtonsPanel): col.itemR(text, "word_spacing", text="Word") col.itemR(text, "line_dist", text="Line") - if col2: + if wide_ui: col = split.column(align=True) col.itemL(text="Offset:") col.itemR(text, "offset_x", text="X") @@ -357,7 +357,7 @@ class DATA_PT_textboxes(DataButtonsPanel): layout = self.layout text = context.curve - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui for box in text.textboxes: split = layout.box().split() @@ -367,7 +367,7 @@ class DATA_PT_textboxes(DataButtonsPanel): col.itemR(box, "width", text="Width") col.itemR(box, "height", text="Height") - if col2: + if wide_ui: col = split.column(align=True) col.itemL(text="Offset:") col.itemR(box, "x", text="X") diff --git a/release/scripts/ui/properties_data_empty.py b/release/scripts/ui/properties_data_empty.py index 6963710a61f..46b500ed086 100644 --- a/release/scripts/ui/properties_data_empty.py +++ b/release/scripts/ui/properties_data_empty.py @@ -38,9 +38,9 @@ class DATA_PT_empty(DataButtonsPanel): layout = self.layout ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(ob, "empty_draw_type", text="Display") else: layout.itemR(ob, "empty_draw_type", text="") diff --git a/release/scripts/ui/properties_data_lamp.py b/release/scripts/ui/properties_data_lamp.py index b7ddf227dae..4bc7a830b1e 100644 --- a/release/scripts/ui/properties_data_lamp.py +++ b/release/scripts/ui/properties_data_lamp.py @@ -48,10 +48,10 @@ class DATA_PT_context_lamp(DataButtonsPanel): ob = context.object lamp = context.lamp space = context.space_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split(percentage=0.65) if ob: split.template_ID(ob, "data") @@ -73,9 +73,9 @@ class DATA_PT_lamp(DataButtonsPanel): layout = self.layout lamp = context.lamp - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(lamp, "type", expand=True) else: layout.itemR(lamp, "type", text="") @@ -104,7 +104,7 @@ class DATA_PT_lamp(DataButtonsPanel): col.itemR(lamp, "distance") col.itemR(lamp, "gamma") - if col2: + if wide_ui: col = split.column() col.itemR(lamp, "negative") col.itemR(lamp, "layer", text="This Layer Only") @@ -123,7 +123,7 @@ class DATA_PT_sunsky(DataButtonsPanel): layout = self.layout lamp = context.lamp.sky - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(lamp, "sky") @@ -145,7 +145,7 @@ class DATA_PT_sunsky(DataButtonsPanel): sub.row().itemR(lamp, "sky_color_space", expand=True) sub.itemR(lamp, "sky_exposure", text="Exposure") - if col2: + if wide_ui: col = split.column() col.active = lamp.sky col.itemL(text="Horizon:") @@ -171,7 +171,7 @@ class DATA_PT_sunsky(DataButtonsPanel): col.itemR(lamp, "sun_intensity", text="Sun") col.itemR(lamp, "atmosphere_distance_factor", text="Distance") - if col2: + if wide_ui: col = split.column() col.active = lamp.atmosphere col.itemL(text="Scattering:") @@ -191,9 +191,9 @@ class DATA_PT_shadow(DataButtonsPanel): layout = self.layout lamp = context.lamp - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(lamp, "shadow_method", expand=True) else: layout.itemR(lamp, "shadow_method", text="") @@ -204,7 +204,7 @@ class DATA_PT_shadow(DataButtonsPanel): col = split.column() col.itemR(lamp, "shadow_color", text="") - if col2: + if wide_ui: col = split.column() col.itemR(lamp, "shadow_layer", text="This Layer Only") col.itemR(lamp, "only_shadow") @@ -212,7 +212,7 @@ class DATA_PT_shadow(DataButtonsPanel): if lamp.shadow_method == 'RAY_SHADOW': col = layout.column() col.itemL(text="Sampling:") - if col2: + if wide_ui: col.row().itemR(lamp, "shadow_ray_sampling_method", expand=True) else: col.itemR(lamp, "shadow_ray_sampling_method", text="") @@ -226,7 +226,7 @@ class DATA_PT_shadow(DataButtonsPanel): col.itemR(lamp, "shadow_ray_samples", text="Samples") if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC': col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold") - if col2: + if wide_ui: col = split.column() elif lamp.type == 'AREA': @@ -242,24 +242,24 @@ class DATA_PT_shadow(DataButtonsPanel): if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC': col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold") - if col2: + if wide_ui: col = split.column() elif lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED': - if col2: + if wide_ui: col = split.column() col.itemR(lamp, "umbra") col.itemR(lamp, "dither") col.itemR(lamp, "jitter") else: - if col2: + if wide_ui: col = split.column() elif lamp.shadow_method == 'BUFFER_SHADOW': col = layout.column() col.itemL(text="Buffer Type:") - if col2: + if wide_ui: col.row().itemR(lamp, "shadow_buffer_type", expand=True) else: col.row().itemR(lamp, "shadow_buffer_type", text="") @@ -274,7 +274,7 @@ class DATA_PT_shadow(DataButtonsPanel): sub.itemR(lamp, "shadow_buffer_soft", text="Soft") sub.itemR(lamp, "shadow_buffer_bias", text="Bias") - if col2: + if wide_ui: col = split.column() col.itemL(text="Sample Buffers:") col.itemR(lamp, "shadow_sample_buffers", text="") @@ -295,7 +295,7 @@ class DATA_PT_shadow(DataButtonsPanel): sub.active = not lamp.auto_clip_start sub.itemR(lamp, "shadow_buffer_clip_start", text="Clip Start") - if col2: + if wide_ui: col = split.column() col.itemR(lamp, "auto_clip_end", text="Autoclip End") sub = col.column() @@ -339,7 +339,7 @@ class DATA_PT_spot(DataButtonsPanel): layout = self.layout lamp = context.lamp - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -349,7 +349,7 @@ class DATA_PT_spot(DataButtonsPanel): sub.itemR(lamp, "spot_blend", text="Blend", slider=True) col.itemR(lamp, "square") - if col2: + if wide_ui: col = split.column() else: col.itemS() diff --git a/release/scripts/ui/properties_data_lattice.py b/release/scripts/ui/properties_data_lattice.py index 20b23924830..0f3d38dc8f4 100644 --- a/release/scripts/ui/properties_data_lattice.py +++ b/release/scripts/ui/properties_data_lattice.py @@ -40,9 +40,9 @@ class DATA_PT_context_lattice(DataButtonsPanel): ob = context.object lat = context.lattice space = context.space_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split(percentage=0.65) if ob: split.template_ID(ob, "data") @@ -64,26 +64,26 @@ class DATA_PT_lattice(DataButtonsPanel): layout = self.layout lat = context.lattice - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() col = split.column() col.itemR(lat, "points_u") - if col2: + if wide_ui: col = split.column() col.itemR(lat, "interpolation_type_u", text="") split = layout.split() col = split.column() col.itemR(lat, "points_v") - if col2: + if wide_ui: col = split.column() col.itemR(lat, "interpolation_type_v", text="") split = layout.split() col = split.column() col.itemR(lat, "points_w") - if col2: + if wide_ui: col = split.column() col.itemR(lat, "interpolation_type_w", text="") diff --git a/release/scripts/ui/properties_data_mesh.py b/release/scripts/ui/properties_data_mesh.py index a3b835dc251..61aa13114d0 100644 --- a/release/scripts/ui/properties_data_mesh.py +++ b/release/scripts/ui/properties_data_mesh.py @@ -41,9 +41,9 @@ class DATA_PT_context_mesh(DataButtonsPanel): ob = context.object mesh = context.mesh space = context.space_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split(percentage=0.65) if ob: split.template_ID(ob, "data") @@ -65,7 +65,7 @@ class DATA_PT_normals(DataButtonsPanel): layout = self.layout mesh = context.mesh - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -75,7 +75,7 @@ class DATA_PT_normals(DataButtonsPanel): sub.active = mesh.autosmooth sub.itemR(mesh, "autosmooth_angle", text="Angle") - if col2: + if wide_ui: col = split.column() else: col.itemS() @@ -154,7 +154,7 @@ class DATA_PT_shape_keys(DataButtonsPanel): ob = context.object key = ob.data.shape_keys kb = ob.active_shape_key - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui enable_edit = ob.mode != 'EDIT' enable_edit_value = False @@ -186,13 +186,13 @@ class DATA_PT_shape_keys(DataButtonsPanel): split = layout.split(percentage=0.4) row = split.row() row.enabled = enable_edit - if col2: + if wide_ui: row.itemR(key, "relative") row = split.row() row.alignment = 'RIGHT' - if not col2: + if not wide_ui: layout.itemR(key, "relative") row = layout.row() @@ -232,7 +232,7 @@ class DATA_PT_shape_keys(DataButtonsPanel): col.itemR(kb, "slider_min", text="Min") col.itemR(kb, "slider_max", text="Max") - if col2: + if wide_ui: col = split.column(align=True) col.active = enable_edit_value col.itemL(text="Blend:") diff --git a/release/scripts/ui/properties_data_metaball.py b/release/scripts/ui/properties_data_metaball.py index cb24e99ca22..52ba9a9917a 100644 --- a/release/scripts/ui/properties_data_metaball.py +++ b/release/scripts/ui/properties_data_metaball.py @@ -40,9 +40,9 @@ class DATA_PT_context_metaball(DataButtonsPanel): ob = context.object mball = context.meta_ball space = context.space_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split(percentage=0.65) if ob: split.template_ID(ob, "data") @@ -64,7 +64,7 @@ class DATA_PT_metaball(DataButtonsPanel): layout = self.layout mball = context.meta_ball - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -74,13 +74,13 @@ class DATA_PT_metaball(DataButtonsPanel): sub.itemR(mball, "wire_size", text="View") sub.itemR(mball, "render_size", text="Render") - if col2: + if wide_ui: col = split.column() col.itemL(text="Settings:") col.itemR(mball, "threshold", text="Threshold") layout.itemL(text="Update:") - if col2: + if wide_ui: layout.itemR(mball, "flag", expand=True) else: layout.itemR(mball, "flag", text="") @@ -96,9 +96,9 @@ class DATA_PT_metaball_element(DataButtonsPanel): layout = self.layout metaelem = context.meta_ball.active_element - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(metaelem, "type") else: layout.itemR(metaelem, "type", text="") @@ -111,7 +111,7 @@ class DATA_PT_metaball_element(DataButtonsPanel): col.itemR(metaelem, "negative", text="Negative") col.itemR(metaelem, "hide", text="Hide") - if col2: + if wide_ui: col = split.column(align=True) if metaelem.type == 'CUBE': diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py index 94ea93bfeac..3f21ba8c6d4 100644 --- a/release/scripts/ui/properties_data_modifier.py +++ b/release/scripts/ui/properties_data_modifier.py @@ -34,31 +34,31 @@ class DATA_PT_modifiers(DataButtonsPanel): layout = self.layout ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui row = layout.row() row.item_menu_enumO("object.modifier_add", "type") - if col2: + if wide_ui: row.itemL() for md in ob.modifiers: box = layout.template_modifier(md) if box: # match enum type to our functions, avoids a lookup table. - getattr(self, md.type)(box, ob, md, col2) + getattr(self, md.type)(box, ob, md, wide_ui) # the mt.type enum is (ab)used for a lookup on function names # ...to avoid lengthy if statements # so each type must have a function here. - def ARMATURE(self, layout, ob, md, col2): - if col2: + def ARMATURE(self, layout, ob, md, wide_ui): + if wide_ui: layout.itemR(md, "object") else: layout.itemR(md, "object", text="") row = layout.row() - if col2: + if wide_ui: row.itemL(text="Vertex Group:") sub = row.split(percentage=0.7) sub.item_pointerR(md, "vertex_group", ob, "vertex_groups", text="") @@ -75,14 +75,14 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "use_vertex_groups", text="Vertex Groups") col.itemR(md, "use_bone_envelopes", text="Bone Envelopes") - if col2: + if wide_ui: col = split.column() col.itemL(text="Deformation:") col.itemR(md, "quaternion") col.itemR(md, "multi_modifier") - def ARRAY(self, layout, ob, md, col2): - if col2: + def ARRAY(self, layout, ob, md, wide_ui): + if wide_ui: layout.itemR(md, "fit_type") else: layout.itemR(md, "fit_type", text="") @@ -113,7 +113,7 @@ class DATA_PT_modifiers(DataButtonsPanel): sub.itemR(md, "merge_end_vertices", text="First Last") sub.itemR(md, "merge_distance", text="Distance") - if col2: + if wide_ui: col = split.column() col.itemR(md, "relative_offset") sub = col.column() @@ -133,13 +133,13 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "start_cap") col.itemR(md, "end_cap") - def BEVEL(self, layout, ob, md, col2): + def BEVEL(self, layout, ob, md, wide_ui): split = layout.split() col = split.column() col.itemR(md, "width") - if col2: + if wide_ui: col = split.column() col.itemR(md, "only_vertices") @@ -150,25 +150,25 @@ class DATA_PT_modifiers(DataButtonsPanel): elif md.limit_method == 'WEIGHT': layout.row().itemR(md, "edge_weight_method", expand=True) - def BOOLEAN(self, layout, ob, md, col2): + def BOOLEAN(self, layout, ob, md, wide_ui): layout.itemR(md, "operation") layout.itemR(md, "object") - def BUILD(self, layout, ob, md, col2): + def BUILD(self, layout, ob, md, wide_ui): split = layout.split() col = split.column() col.itemR(md, "start") col.itemR(md, "length") - if col2: + if wide_ui: col = split.column() col.itemR(md, "randomize") sub = col.column() sub.active = md.randomize sub.itemR(md, "seed") - def CAST(self, layout, ob, md, col2): + def CAST(self, layout, ob, md, wide_ui): layout.itemR(md, "cast_type") layout.itemR(md, "object") if md.object: @@ -181,7 +181,7 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "y") col.itemR(md, "z") - if col2: + if wide_ui: col = split.column() col.itemR(md, "factor") col.itemR(md, "radius") @@ -191,29 +191,29 @@ class DATA_PT_modifiers(DataButtonsPanel): layout.item_pointerR(md, "vertex_group", ob, "vertex_groups") - def CLOTH(self, layout, ob, md, col2): + def CLOTH(self, layout, ob, md, wide_ui): layout.itemL(text="See Cloth panel.") - def COLLISION(self, layout, ob, md, col2): + def COLLISION(self, layout, ob, md, wide_ui): layout.itemL(text="See Collision panel.") - def CURVE(self, layout, ob, md, col2): + def CURVE(self, layout, ob, md, wide_ui): layout.itemR(md, "object") layout.item_pointerR(md, "vertex_group", ob, "vertex_groups") layout.itemR(md, "deform_axis") - def DECIMATE(self, layout, ob, md, col2): + def DECIMATE(self, layout, ob, md, wide_ui): layout.itemR(md, "ratio") layout.itemR(md, "face_count") - def DISPLACE(self, layout, ob, md, col2): + def DISPLACE(self, layout, ob, md, wide_ui): split = layout.split() col = split.column() col.itemR(md, "midlevel") - if col2: + if wide_ui: col = split.column() col.itemR(md, "strength") @@ -227,7 +227,7 @@ class DATA_PT_modifiers(DataButtonsPanel): elif md.texture_coordinates == 'UV' and ob.type == 'MESH': layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures") - def EDGE_SPLIT(self, layout, ob, md, col2): + def EDGE_SPLIT(self, layout, ob, md, wide_ui): split = layout.split() col = split.column() @@ -236,11 +236,11 @@ class DATA_PT_modifiers(DataButtonsPanel): sub.active = md.use_edge_angle sub.itemR(md, "split_angle") - if col2: + if wide_ui: col = split.column() col.itemR(md, "use_sharp", text="Sharp Edges") - def EXPLODE(self, layout, ob, md, col2): + def EXPLODE(self, layout, ob, md, wide_ui): layout.item_pointerR(md, "vertex_group", ob, "vertex_groups") layout.itemR(md, "protect") @@ -250,17 +250,17 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "split_edges") col.itemR(md, "unborn") - if col2: + if wide_ui: col = split.column() col.itemR(md, "alive") col.itemR(md, "dead") layout.itemO("object.explode_refresh", text="Refresh") - def FLUID_SIMULATION(self, layout, ob, md, col2): + def FLUID_SIMULATION(self, layout, ob, md, wide_ui): layout.itemL(text="See Fluid panel.") - def HOOK(self, layout, ob, md, col2): + def HOOK(self, layout, ob, md, wide_ui): col = layout.column() col.itemR(md, "object") if md.object and md.object.type == 'ARMATURE': @@ -273,7 +273,7 @@ class DATA_PT_modifiers(DataButtonsPanel): col = split.column() col.itemR(md, "falloff") - if col2: + if wide_ui: col = split.column() col.itemR(md, "force", slider=True) @@ -284,7 +284,7 @@ class DATA_PT_modifiers(DataButtonsPanel): col = split.column() col.itemO("object.hook_reset", text="Reset") - if col2: + if wide_ui: col = split.column() col.itemO("object.hook_recenter", text="Recenter") @@ -293,11 +293,11 @@ class DATA_PT_modifiers(DataButtonsPanel): row.itemO("object.hook_select", text="Select") row.itemO("object.hook_assign", text="Assign") - def LATTICE(self, layout, ob, md, col2): + def LATTICE(self, layout, ob, md, wide_ui): layout.itemR(md, "object") layout.item_pointerR(md, "vertex_group", ob, "vertex_groups") - def MASK(self, layout, ob, md, col2): + def MASK(self, layout, ob, md, wide_ui): layout.itemR(md, "mode") if md.mode == 'ARMATURE': layout.itemR(md, "armature") @@ -305,7 +305,7 @@ class DATA_PT_modifiers(DataButtonsPanel): layout.item_pointerR(md, "vertex_group", ob, "vertex_groups") layout.itemR(md, "inverse") - def MESH_DEFORM(self, layout, ob, md, col2): + def MESH_DEFORM(self, layout, ob, md, wide_ui): layout.itemR(md, "object") layout.item_pointerR(md, "vertex_group", ob, "vertex_groups") layout.itemR(md, "invert") @@ -321,11 +321,11 @@ class DATA_PT_modifiers(DataButtonsPanel): col = split.column() col.itemR(md, "precision") - if col2: + if wide_ui: col = split.column() col.itemR(md, "dynamic") - def MIRROR(self, layout, ob, md, col2): + def MIRROR(self, layout, ob, md, wide_ui): split = layout.split() @@ -334,7 +334,7 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "y") col.itemR(md, "z") - if col2: + if wide_ui: col = split.column() col.itemL(text="Textures:") col.itemR(md, "mirror_u", text="U") @@ -345,14 +345,14 @@ class DATA_PT_modifiers(DataButtonsPanel): split = layout.split() col = split.column() col.itemR(md, "clip") - if col2: + if wide_ui: col = split.column() col.itemR(md, "mirror_vertex_groups", text="Vertex Groups") layout.itemR(md, "mirror_object") - def MULTIRES(self, layout, ob, md, col2): - if col2: + def MULTIRES(self, layout, ob, md, wide_ui): + if wide_ui: layout.row().itemR(md, "subdivision_type", expand=True) else: layout.row().itemR(md, "subdivision_type", text="") @@ -363,11 +363,11 @@ class DATA_PT_modifiers(DataButtonsPanel): col = split.column() col.itemO("object.multires_subdivide", text="Subdivide") - if col2: + if wide_ui: col = split.column() col.itemO("object.multires_higher_levels_delete", text="Delete Higher") - def PARTICLE_INSTANCE(self, layout, ob, md, col2): + def PARTICLE_INSTANCE(self, layout, ob, md, wide_ui): layout.itemR(md, "object") layout.itemR(md, "particle_system_number", text="Particle System") @@ -378,7 +378,7 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "children") col.itemR(md, "size") - if col2: + if wide_ui: col = split.column() col.itemL(text="Show Particles When:") col.itemR(md, "alive") @@ -395,15 +395,15 @@ class DATA_PT_modifiers(DataButtonsPanel): col.row().itemR(md, "axis", expand=True) col.itemR(md, "keep_shape") - if col2: + if wide_ui: col = split.column() col.itemR(md, "position", slider=True) col.itemR(md, "random_position", text="Random", slider=True) - def PARTICLE_SYSTEM(self, layout, ob, md, col2): + def PARTICLE_SYSTEM(self, layout, ob, md, wide_ui): layout.itemL(text="See Particle panel.") - def SHRINKWRAP(self, layout, ob, md, col2): + def SHRINKWRAP(self, layout, ob, md, wide_ui): layout.itemR(md, "target") layout.item_pointerR(md, "vertex_group", ob, "vertex_groups") @@ -411,11 +411,11 @@ class DATA_PT_modifiers(DataButtonsPanel): col = split.column() col.itemR(md, "offset") - if col2: + if wide_ui: col = split.column() col.itemR(md, "subsurf_levels") - if col2: + if wide_ui: layout.itemR(md, "mode") else: layout.itemR(md, "mode", text="") @@ -441,7 +441,7 @@ class DATA_PT_modifiers(DataButtonsPanel): elif md.mode == 'NEAREST_SURFACEPOINT': layout.itemR(md, "keep_above_surface") - def SIMPLE_DEFORM(self, layout, ob, md, col2): + def SIMPLE_DEFORM(self, layout, ob, md, wide_ui): layout.itemR(md, "mode") layout.item_pointerR(md, "vertex_group", ob, "vertex_groups") layout.itemR(md, "origin") @@ -452,10 +452,10 @@ class DATA_PT_modifiers(DataButtonsPanel): layout.itemR(md, "lock_x_axis") layout.itemR(md, "lock_y_axis") - def SMOKE(self, layout, ob, md, col2): + def SMOKE(self, layout, ob, md, wide_ui): layout.itemL(text="See Smoke panel.") - def SMOOTH(self, layout, ob, md, col2): + def SMOOTH(self, layout, ob, md, wide_ui): split = layout.split() col = split.column() @@ -463,18 +463,18 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "y") col.itemR(md, "z") - if col2: + if wide_ui: col = split.column() col.itemR(md, "factor") col.itemR(md, "repeat") layout.item_pointerR(md, "vertex_group", ob, "vertex_groups") - def SOFT_BODY(self, layout, ob, md, col2): + def SOFT_BODY(self, layout, ob, md, wide_ui): layout.itemL(text="See Soft Body panel.") - def SUBSURF(self, layout, ob, md, col2): - if col2: + def SUBSURF(self, layout, ob, md, wide_ui): + if wide_ui: layout.row().itemR(md, "subdivision_type", expand=True) else: layout.row().itemR(md, "subdivision_type", text="") @@ -485,16 +485,16 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "levels", text="View") col.itemR(md, "render_levels", text="Render") - if col2: + if wide_ui: col = split.column() col.itemL(text="Options:") col.itemR(md, "optimal_draw", text="Optimal Display") col.itemR(md, "subsurf_uv") - def SURFACE(self, layout, ob, md, col2): + def SURFACE(self, layout, ob, md, wide_ui): layout.itemL(text="See Fields panel.") - def UV_PROJECT(self, layout, ob, md, col2): + def UV_PROJECT(self, layout, ob, md, wide_ui): if ob.type == 'MESH': layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures") layout.itemR(md, "image") @@ -508,14 +508,14 @@ class DATA_PT_modifiers(DataButtonsPanel): for proj in md.projectors: col.itemR(proj, "object", text="") - if col2: + if wide_ui: col = split.column() sub = col.column(align=True) sub.itemL(text="Aspect Ratio:") sub.itemR(md, "horizontal_aspect_ratio", text="Horizontal") sub.itemR(md, "vertical_aspect_ratio", text="Vertical") - def WAVE(self, layout, ob, md, col2): + def WAVE(self, layout, ob, md, wide_ui): split = layout.split() col = split.column() @@ -524,7 +524,7 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "y") col.itemR(md, "cyclic") - if col2: + if wide_ui: col = split.column() col.itemR(md, "normals") sub = col.column() @@ -542,7 +542,7 @@ class DATA_PT_modifiers(DataButtonsPanel): sub.itemR(md, "lifetime", text="Life") col.itemR(md, "damping_time", text="Damping") - if col2: + if wide_ui: col = split.column() col.itemL(text="Position:") sub = col.column(align=True) @@ -569,7 +569,7 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "speed", slider=True) col.itemR(md, "height", slider=True) - if col2: + if wide_ui: col = split.column() col.itemR(md, "width", slider=True) col.itemR(md, "narrowness", slider=True) diff --git a/release/scripts/ui/properties_game.py b/release/scripts/ui/properties_game.py index 10d4c604d17..a4730534d6c 100644 --- a/release/scripts/ui/properties_game.py +++ b/release/scripts/ui/properties_game.py @@ -41,9 +41,9 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel): ob = context.active_object game = ob.game soft = ob.game.soft_body - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(game, "physics_type") else: layout.itemR(game, "physics_type", text="") @@ -58,7 +58,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel): col.itemR(game, "ghost") col.itemR(ob, "restrict_render", text="Invisible") # out of place but useful - if col2: + if wide_ui: col = split.column() col.itemR(game, "material_physics") col.itemR(game, "rotate_from_normal") @@ -74,7 +74,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel): col.itemR(game, "radius") col.itemR(game, "form_factor") - if col2: + if wide_ui: col = split.column() sub = col.column() sub.active = (game.physics_type == 'RIGID_BODY') @@ -91,7 +91,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel): sub.itemR(game, "minimum_velocity", text="Minimum") sub.itemR(game, "maximum_velocity", text="Maximum") - if col2: + if wide_ui: col = split.column() col.itemL(text="Damping:") sub = col.column(align=True) @@ -134,7 +134,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel): col.itemR(soft, "margin", slider=True) col.itemR(soft, "bending_const", text="Bending Constraints") - if col2: + if wide_ui: col = split.column() col.itemR(soft, "shape_match") sub = col.column() @@ -177,10 +177,10 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel): layout = self.layout game = context.active_object.game - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = game.use_collision_bounds - if col2: + if wide_ui: layout.itemR(game, "collision_bounds", text="Bounds") else: layout.itemR(game, "collision_bounds", text="") @@ -190,7 +190,7 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel): col = split.column() col.itemR(game, "collision_margin", text="Margin", slider=True) - if col2: + if wide_ui: col = split.column() col.itemR(game, "collision_compound", text="Compound") @@ -227,7 +227,7 @@ class RENDER_PT_game_player(RenderButtonsPanel): layout = self.layout gs = context.scene.game_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(gs, "fullscreen") @@ -239,7 +239,7 @@ class RENDER_PT_game_player(RenderButtonsPanel): sub.itemR(gs, "resolution_x", slider=False, text="X") sub.itemR(gs, "resolution_y", slider=False, text="Y") - if col2: + if wide_ui: col = split.column() col.itemL(text="Quality:") sub = col.column(align=True) @@ -249,7 +249,7 @@ class RENDER_PT_game_player(RenderButtonsPanel): # framing: col = layout.column() col.itemL(text="Framing:") - if col2: + if wide_ui: col.row().itemR(gs, "framing_type", expand=True) else: col.itemR(gs, "framing_type", text="") @@ -265,7 +265,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel): gs = context.scene.game_data stereo_mode = gs.stereo - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui # stereo options: layout.itemR(gs, "stereo", expand=True) @@ -278,7 +278,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel): # dome: elif stereo_mode == 'DOME': - if col2: + if wide_ui: layout.itemR(gs, "dome_mode", text="Dome Type") else: layout.itemR(gs, "dome_mode", text="") @@ -295,7 +295,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel): col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True) col.itemR(gs, "dome_angle", slider=True) - if col2: + if wide_ui: col = split.column() col.itemR(gs, "dome_tesselation", text="Tesselation") col.itemR(gs, "dome_tilt") @@ -304,14 +304,14 @@ class RENDER_PT_game_stereo(RenderButtonsPanel): col = split.column() col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True) - if col2: + if wide_ui: col = split.column() col.itemR(gs, "dome_tesselation", text="Tesselation") else: # cube map col = split.column() col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True) - if col2: + if wide_ui: col = split.column() layout.itemR(gs, "dome_text") @@ -324,9 +324,9 @@ class RENDER_PT_game_shading(RenderButtonsPanel): layout = self.layout gs = context.scene.game_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(gs, "material_mode", expand=True) else: layout.itemR(gs, "material_mode", text="") @@ -352,7 +352,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel): layout = self.layout gs = context.scene.game_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -363,7 +363,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel): col.itemR(gs, "show_physics_visualization", text="Physics Visualization") col.itemR(gs, "deprecation_warnings") - if col2: + if wide_ui: col = split.column() col.itemL(text="Render:") col.itemR(gs, "all_frames") @@ -377,9 +377,9 @@ class RENDER_PT_game_sound(RenderButtonsPanel): layout = self.layout scene = context.scene - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(scene, "distance_model") else: layout.itemR(scene, "distance_model", text="") @@ -418,9 +418,9 @@ class WORLD_PT_game_context_world(WorldButtonsPanel): scene = context.scene world = context.world space = context.space_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split(percentage=0.65) if scene: split.template_ID(scene, "world", new="world.new") @@ -439,14 +439,14 @@ class WORLD_PT_game_world(WorldButtonsPanel): layout = self.layout world = context.world - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() col = split.column() col.itemR(world, "horizon_color") - if col2: + if wide_ui: col = split.column() col.itemR(world, "ambient_color") @@ -462,7 +462,7 @@ class WORLD_PT_game_mist(WorldButtonsPanel): layout = self.layout world = context.world - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = world.mist.enabled split = layout.split() @@ -470,7 +470,7 @@ class WORLD_PT_game_mist(WorldButtonsPanel): col = split.column() col.itemR(world.mist, "start") - if col2: + if wide_ui: col = split.column() col.itemR(world.mist, "depth") @@ -481,7 +481,7 @@ class WORLD_PT_game_physics(WorldButtonsPanel): layout = self.layout gs = context.scene.game_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(gs, "physics_engine") if gs.physics_engine != 'NONE': @@ -496,7 +496,7 @@ class WORLD_PT_game_physics(WorldButtonsPanel): sub.itemR(gs, "physics_step_sub", text="Substeps") col.itemR(gs, "fps", text="FPS") - if col2: + if wide_ui: col = split.column() col.itemL(text="Logic Steps:") col.itemR(gs, "logic_step_max", text="Max") diff --git a/release/scripts/ui/properties_material.py b/release/scripts/ui/properties_material.py index e0f5d94a863..e85ad30e6f6 100644 --- a/release/scripts/ui/properties_material.py +++ b/release/scripts/ui/properties_material.py @@ -74,7 +74,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel): ob = context.object slot = context.material_slot space = context.space_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui if ob: row = layout.row() @@ -92,7 +92,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel): row.itemO("object.material_slot_select", text="Select") row.itemO("object.material_slot_deselect", text="Deselect") - if col2: + if wide_ui: split = layout.split(percentage=0.65) if ob: @@ -112,7 +112,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel): layout.template_ID(space, "pin_id") if mat: - if col2: + if wide_ui: layout.itemR(mat, "type", expand=True) else: layout.itemR(mat, "type", text="") @@ -131,7 +131,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel): layout = self.layout mat = active_node_mat(context.material) - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui if mat.type in ('SURFACE', 'WIRE'): split = layout.split() @@ -144,7 +144,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel): sub = col.column() sub.itemR(mat, "translucency") - if col2: + if wide_ui: col = split.column() col.itemR(mat, "shadeless") sub = col.column() @@ -171,7 +171,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel): mat = context.material # dont use node material tan = mat.strand - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -187,7 +187,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel): sub.itemR(tan, "tangent_shading") col.itemR(tan, "shape") - if col2: + if wide_ui: col = split.column() col.itemL(text="Shading:") col.itemR(tan, "width_fade") @@ -213,7 +213,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel): layout = self.layout phys = context.material.physics # dont use node material - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -222,7 +222,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel): col.itemR(phys, "friction") col.itemR(phys, "align_to_normal") - if col2: + if wide_ui: col = split.column() col.itemR(phys, "force", slider=True) col.itemR(phys, "elasticity", slider=True) @@ -242,7 +242,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel): layout = self.layout mat = active_node_mat(context.material) - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -262,7 +262,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel): row.active = mat.light_group row.itemR(mat, "light_group_exclusive", text="Exclusive") - if col2: + if wide_ui: col = split.column() col.itemR(mat, "face_texture") sub = col.column() @@ -288,7 +288,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel): layout = self.layout mat = active_node_mat(context.material) - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -299,7 +299,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel): col.itemR(mat, "cast_shadows_only", text="Cast Only") col.itemR(mat, "shadow_casting_alpha", text="Casting Alpha") - if col2: + if wide_ui: col = split.column() col.itemR(mat, "cast_buffer_shadows") sub = col.column() @@ -324,7 +324,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel): layout = self.layout mat = active_node_mat(context.material) - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -334,7 +334,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel): sub.active = (not mat.shadeless) sub.itemR(mat, "diffuse_intensity", text="Intensity") - if col2: + if wide_ui: col = split.column() col.active = (not mat.shadeless) col.itemR(mat, "diffuse_shader", text="") @@ -352,7 +352,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel): col = split.column() col.itemR(mat, "diffuse_toon_size", text="Size") - if col2: + if wide_ui: col = split.column() col.itemR(mat, "diffuse_toon_smooth", text="Smooth") elif mat.diffuse_shader == 'FRESNEL': @@ -361,7 +361,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel): col = split.column() col.itemR(mat, "diffuse_fresnel", text="Fresnel") - if col2: + if wide_ui: col = split.column() col.itemR(mat, "diffuse_fresnel_factor", text="Factor") @@ -375,7 +375,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel): col = split.column() col.itemR(mat, "diffuse_ramp_input", text="Input") - if col2: + if wide_ui: col = split.column() col.itemR(mat, "diffuse_ramp_blend", text="Blend") row = layout.row() @@ -395,7 +395,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel): layout = self.layout mat = active_node_mat(context.material) - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = (not mat.shadeless) @@ -405,7 +405,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel): col.itemR(mat, "specular_color", text="") col.itemR(mat, "specular_intensity", text="Intensity") - if col2: + if wide_ui: col = split.column() col.itemR(mat, "specular_shader", text="") col.itemR(mat, "use_specular_ramp", text="Ramp") @@ -419,7 +419,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel): col = split.column() col.itemR(mat, "specular_hardness", text="Hardness") - if col2: + if wide_ui: col = split.column() col.itemR(mat, "specular_ior", text="IOR") elif mat.specular_shader == 'WARDISO': @@ -430,7 +430,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel): col = split.column() col.itemR(mat, "specular_toon_size", text="Size") - if col2: + if wide_ui: col = split.column() col.itemR(mat, "specular_toon_smooth", text="Smooth") @@ -443,7 +443,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel): col = split.column() col.itemR(mat, "specular_ramp_input", text="Input") - if col2: + if wide_ui: col = split.column() col.itemR(mat, "specular_ramp_blend", text="Blend") @@ -473,7 +473,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel): mat = active_node_mat(context.material) sss = mat.subsurface_scattering - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = sss.enabled @@ -486,7 +486,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel): col.itemR(sss, "color", text="") col.itemR(sss, "radius", text="RGB Radius") - if col2: + if wide_ui: col = split.column() sub = col.column(align=True) sub.itemL(text="Blend:") @@ -519,7 +519,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel): mat = active_node_mat(context.material) raym = mat.raytrace_mirror - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = raym.enabled @@ -529,7 +529,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel): col.itemR(raym, "reflect_factor") col.itemR(mat, "mirror_color", text="") - if col2: + if wide_ui: col = split.column() col.itemR(raym, "fresnel") sub = col.column() @@ -547,7 +547,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel): sub.itemL(text="Fade To:") sub.itemR(raym, "fade_to", text="") - if col2: + if wide_ui: col = split.column() col.itemL(text="Gloss:") col.itemR(raym, "gloss_factor", text="Amount") @@ -578,11 +578,11 @@ class MATERIAL_PT_transp(MaterialButtonsPanel): mat = active_node_mat(context.material) rayt = mat.raytrace_transparency - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui row = layout.row() row.active = mat.transparency and (not mat.shadeless) - if col2: + if wide_ui: row.itemR(mat, "transparency_method", expand=True) else: row.itemR(mat, "transparency_method", text="") @@ -595,7 +595,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel): row.active = mat.transparency and (not mat.shadeless) row.itemR(mat, "specular_alpha", text="Specular") - if col2: + if wide_ui: col = split.column() col.active = (not mat.shadeless) col.itemR(rayt, "fresnel") @@ -615,7 +615,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel): col.itemR(rayt, "limit") col.itemR(rayt, "depth") - if col2: + if wide_ui: col = split.column() col.itemL(text="Gloss:") col.itemR(rayt, "gloss_factor", text="Amount") @@ -639,7 +639,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel): mat = context.material # dont use node material halo = mat.halo - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -655,7 +655,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel): col.itemR(halo, "shaded") col.itemR(halo, "soft") - if col2: + if wide_ui: col = split.column() col.itemR(halo, "ring") sub = col.column() @@ -694,7 +694,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel): mat = context.material # dont use node material halo = mat.halo - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = halo.flare_mode @@ -704,7 +704,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel): col.itemR(halo, "flare_size", text="Size") col.itemR(halo, "flare_boost", text="Boost") col.itemR(halo, "flare_seed", text="Seed") - if col2: + if wide_ui: col = split.column() col.itemR(halo, "flares_sub", text="Subflares") col.itemR(halo, "flare_subsize", text="Subsize") @@ -745,13 +745,13 @@ class MATERIAL_PT_volume_density(VolumeButtonsPanel): layout = self.layout vol = context.material.volume # dont use node material - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() col = split.column() col.itemR(vol, "density") - if col2: + if wide_ui: col = split.column() col.itemR(vol, "density_scale") @@ -765,7 +765,7 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel): layout = self.layout vol = context.material.volume # dont use node material - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -774,7 +774,7 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel): col.itemR(vol, "asymmetry") col.itemR(vol, "transmission_color") - if col2: + if wide_ui: col = split.column() sub = col.column(align=True) sub.itemR(vol, "emission") @@ -793,14 +793,14 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel): layout = self.layout vol = context.material.volume # dont use node material - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() col = split.column() col.itemR(vol, "lighting_mode", text="") - if col2: + if wide_ui: col = split.column() if vol.lighting_mode == 'SHADED': @@ -830,9 +830,9 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel): layout = self.layout mat = context.material # dont use node material - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(mat, "transparency_method", expand=True) else: layout.itemR(mat, "transparency_method", text="") @@ -847,7 +847,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel): layout = self.layout vol = context.material.volume # dont use node material - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -857,7 +857,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel): col = col.column(align=True) col.itemR(vol, "step_size") - if col2: + if wide_ui: col = split.column() col.itemL() col.itemR(vol, "depth_cutoff") diff --git a/release/scripts/ui/properties_object.py b/release/scripts/ui/properties_object.py index 71a05792ee4..a1e3edba8ee 100644 --- a/release/scripts/ui/properties_object.py +++ b/release/scripts/ui/properties_object.py @@ -49,9 +49,9 @@ class OBJECT_PT_transform(ObjectButtonsPanel): layout = self.layout ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: row = layout.row() row.column().itemR(ob, "location") @@ -90,7 +90,7 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel): layout = self.layout ob = context.object - # col2 = context.region.width > narrowui + # wide_ui = context.region.width > narrowui row = layout.row() @@ -116,7 +116,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel): layout = self.layout ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -125,7 +125,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel): col.itemS() col.itemR(ob, "pass_index") - if col2: + if wide_ui: col = split.column() col.itemL(text="Parent:") col.itemR(ob, "parent", text="") @@ -145,9 +145,9 @@ class OBJECT_PT_groups(ObjectButtonsPanel): layout = self.layout ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split() split.item_menu_enumO("object.group_add", "group", text="Add to Group") split.itemL() @@ -169,7 +169,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel): col = split.column() col.itemR(group, "layer", text="Dupli") - if col2: + if wide_ui: col = split.column() col.itemR(group, "dupli_offset", text="") @@ -181,13 +181,13 @@ class OBJECT_PT_display(ObjectButtonsPanel): layout = self.layout ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() col = split.column() col.itemR(ob, "max_draw_type", text="Type") - if col2: + if wide_ui: col = split.column() row = col.row() row.itemR(ob, "draw_bounds", text="Bounds") @@ -202,7 +202,7 @@ class OBJECT_PT_display(ObjectButtonsPanel): col.itemR(ob, "draw_axis", text="Axis") col.itemR(ob, "draw_wire", text="Wire") - if col2: + if wide_ui: col = split.column() col.itemR(ob, "draw_texture_space", text="Texture Space") col.itemR(ob, "x_ray", text="X-Ray") @@ -216,9 +216,9 @@ class OBJECT_PT_duplication(ObjectButtonsPanel): layout = self.layout ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(ob, "dupli_type", expand=True) else: layout.itemR(ob, "dupli_type", text="") @@ -230,7 +230,7 @@ class OBJECT_PT_duplication(ObjectButtonsPanel): col.itemR(ob, "dupli_frames_start", text="Start") col.itemR(ob, "dupli_frames_end", text="End") - if col2: + if wide_ui: col = split.column(align=True) col.itemR(ob, "dupli_frames_on", text="On") col.itemR(ob, "dupli_frames_off", text="Off") @@ -246,12 +246,12 @@ class OBJECT_PT_duplication(ObjectButtonsPanel): col = split.column() col.itemR(ob, "dupli_faces_scale", text="Scale") - if col2: + if wide_ui: col = split.column() col.itemR(ob, "dupli_faces_inherit_scale", text="Inherit Scale") elif ob.dupli_type == 'GROUP': - if col2: + if wide_ui: layout.itemR(ob, "dupli_group", text="Group") else: layout.itemR(ob, "dupli_group", text="") @@ -264,7 +264,7 @@ class OBJECT_PT_animation(ObjectButtonsPanel): layout = self.layout ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -282,7 +282,7 @@ class OBJECT_PT_animation(ObjectButtonsPanel): row.active = ob.parent != None col.itemR(ob, "time_offset", text="Offset") - if col2: + if wide_ui: col = split.column() col.itemL(text="Track:") col.itemR(ob, "track", text="") diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py index ae8c9d23330..1816be06483 100644 --- a/release/scripts/ui/properties_object_constraint.py +++ b/release/scripts/ui/properties_object_constraint.py @@ -30,23 +30,23 @@ class ConstraintButtonsPanel(bpy.types.Panel): layout = self.layout box = layout.template_constraint(con) - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui if box: # match enum type to our functions, avoids a lookup table. - getattr(self, con.type)(context, box, con, col2) + getattr(self, con.type)(context, box, con, wide_ui) # show/key buttons here are most likely obsolete now, with # keyframing functionality being part of every button if con.type not in ('RIGID_BODY_JOINT', 'SPLINE_IK', 'NULL'): box.itemR(con, "influence") - def space_template(self, layout, con, col2, target=True, owner=True): + def space_template(self, layout, con, wide_ui, target=True, owner=True): if target or owner: split = layout.split(percentage=0.2) - if col2: + if wide_ui: split.itemL(text="Space:") row = split.row() else: @@ -56,7 +56,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): if target: row.itemR(con, "target_space", text="") - if col2: + if wide_ui: if target and owner: row.itemL(icon='ICON_ARROW_LEFTRIGHT') else: @@ -64,15 +64,15 @@ class ConstraintButtonsPanel(bpy.types.Panel): if owner: row.itemR(con, "owner_space", text="") - def target_template(self, layout, con, col2, subtargets=True): - if col2: + def target_template(self, layout, con, wide_ui, subtargets=True): + if wide_ui: layout.itemR(con, "target") # XXX limiting settings for only 'curves' or some type of object else: layout.itemR(con, "target", text="") if con.target and subtargets: if con.target.type == 'ARMATURE': - if col2: + if wide_ui: layout.item_pointerR(con, "subtarget", con.target.data, "bones", text="Bone") else: layout.item_pointerR(con, "subtarget", con.target.data, "bones", text="") @@ -84,7 +84,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): elif con.target.type in ('MESH', 'LATTICE'): layout.item_pointerR(con, "subtarget", con.target, "vertex_groups", text="Vertex Group") - def ik_template(self, layout, con, col2): + def ik_template(self, layout, con, wide_ui): # only used for iTaSC layout.itemR(con, "pole_target") @@ -105,8 +105,8 @@ class ConstraintButtonsPanel(bpy.types.Panel): col.itemR(con, "chain_length") col.itemR(con, "targetless") - def CHILD_OF(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def CHILD_OF(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) split = layout.split() @@ -133,15 +133,15 @@ class ConstraintButtonsPanel(bpy.types.Panel): col = split.column() col.itemO("constraint.childof_set_inverse") - if col2: + if wide_ui: col = split.column() col.itemO("constraint.childof_clear_inverse") - def TRACK_TO(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def TRACK_TO(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) row = layout.row() - if col2: + if wide_ui: row.itemL(text="To:") row.itemR(con, "track", expand=True) @@ -150,25 +150,25 @@ class ConstraintButtonsPanel(bpy.types.Panel): col = split.column() col.itemR(con, "up", text="Up") - if col2: + if wide_ui: col = split.column() col.itemR(con, "target_z") - self.space_template(layout, con, col2) + self.space_template(layout, con, wide_ui) - def IK(self, context, layout, con, col2): + def IK(self, context, layout, con, wide_ui): if context.object.pose.ik_solver == "ITASC": layout.itemR(con, "ik_type") getattr(self, 'IK_' + con.ik_type)(context, layout, con) else: # Legacy IK constraint - self.target_template(layout, con, col2) - if col2: + self.target_template(layout, con, wide_ui) + if wide_ui: layout.itemR(con, "pole_target") else: layout.itemR(con, "pole_target", text="") if con.pole_target and con.pole_target.type == 'ARMATURE': - if col2: + if wide_ui: layout.item_pointerR(con, "pole_subtarget", con.pole_target.data, "bones", text="Bone") else: layout.item_pointerR(con, "pole_subtarget", con.pole_target.data, "bones", text="") @@ -176,7 +176,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): if con.pole_target: row = layout.row() row.itemR(con, "pole_angle") - if col2: + if wide_ui: row.itemL() split = layout.split() @@ -190,7 +190,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.active = con.rotation sub.itemR(con, "orient_weight", text="Rotation", slider=True) - if col2: + if wide_ui: col = split.column() col.itemR(con, "tail") col.itemR(con, "stretch") @@ -198,9 +198,9 @@ class ConstraintButtonsPanel(bpy.types.Panel): col.itemR(con, "targetless") col.itemR(con, "rotation") - def IK_COPY_POSE(self, context, layout, con, col2): - self.target_template(layout, con, col2) - self.ik_template(layout, con, col2) + def IK_COPY_POSE(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) + self.ik_template(layout, con, wide_ui) row = layout.row() row.itemL(text="Axis Ref:") @@ -233,17 +233,17 @@ class ConstraintButtonsPanel(bpy.types.Panel): row.itemR(con, "rot_lock_z", text="Z") split.active = con.rotation - def IK_DISTANCE(self, context, layout, con, col2): - self.target_template(layout, con, col2) - self.ik_template(layout, con, col2) + def IK_DISTANCE(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) + self.ik_template(layout, con, wide_ui) layout.itemR(con, "limit_mode") row = layout.row() row.itemR(con, "weight", text="Weight", slider=True) row.itemR(con, "distance", text="Distance", slider=True) - def FOLLOW_PATH(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def FOLLOW_PATH(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) split = layout.split() @@ -251,7 +251,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): col.itemR(con, "use_curve_follow") col.itemR(con, "use_curve_radius") - if col2: + if wide_ui: col = split.column() col.itemR(con, "use_fixed_position") if con.use_fixed_position: @@ -260,16 +260,16 @@ class ConstraintButtonsPanel(bpy.types.Panel): col.itemR(con, "offset") row = layout.row() - if col2: + if wide_ui: row.itemL(text="Forward:") row.itemR(con, "forward", expand=True) row = layout.row() row.itemR(con, "up", text="Up") - if col2: + if wide_ui: row.itemL() - def LIMIT_ROTATION(self, context, layout, con, col2): + def LIMIT_ROTATION(self, context, layout, con, wide_ui): split = layout.split() @@ -280,7 +280,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.itemR(con, "minimum_x", text="Min") sub.itemR(con, "maximum_x", text="Max") - if col2: + if wide_ui: col = split.column(align=True) col.itemR(con, "use_limit_y") sub = col.column() @@ -288,7 +288,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.itemR(con, "minimum_y", text="Min") sub.itemR(con, "maximum_y", text="Max") - if col2: + if wide_ui: col = split.column(align=True) col.itemR(con, "use_limit_z") sub = col.column() @@ -298,15 +298,15 @@ class ConstraintButtonsPanel(bpy.types.Panel): row = layout.row() row.itemR(con, "limit_transform") - if col2: + if wide_ui: row.itemL() row = layout.row() - if col2: + if wide_ui: row.itemL(text="Convert:") row.itemR(con, "owner_space", text="") - def LIMIT_LOCATION(self, context, layout, con, col2): + def LIMIT_LOCATION(self, context, layout, con, wide_ui): split = layout.split() col = split.column() @@ -319,7 +319,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.active = con.use_maximum_x sub.itemR(con, "maximum_x", text="") - if col2: + if wide_ui: col = split.column() col.itemR(con, "use_minimum_y") sub = col.column() @@ -330,7 +330,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.active = con.use_maximum_y sub.itemR(con, "maximum_y", text="") - if col2: + if wide_ui: col = split.column() col.itemR(con, "use_minimum_z") sub = col.column() @@ -343,15 +343,15 @@ class ConstraintButtonsPanel(bpy.types.Panel): row = layout.row() row.itemR(con, "limit_transform") - if col2: + if wide_ui: row.itemL() row = layout.row() - if col2: + if wide_ui: row.itemL(text="Convert:") row.itemR(con, "owner_space", text="") - def LIMIT_SCALE(self, context, layout, con, col2): + def LIMIT_SCALE(self, context, layout, con, wide_ui): split = layout.split() col = split.column() @@ -364,7 +364,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.active = con.use_maximum_x sub.itemR(con, "maximum_x", text="") - if col2: + if wide_ui: col = split.column() col.itemR(con, "use_minimum_y") sub = col.column() @@ -375,7 +375,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.active = con.use_maximum_y sub.itemR(con, "maximum_y", text="") - if col2: + if wide_ui: col = split.column() col.itemR(con, "use_minimum_z") sub = col.column() @@ -388,16 +388,16 @@ class ConstraintButtonsPanel(bpy.types.Panel): row = layout.row() row.itemR(con, "limit_transform") - if col2: + if wide_ui: row.itemL() row = layout.row() - if col2: + if wide_ui: row.itemL(text="Convert:") row.itemR(con, "owner_space", text="") - def COPY_ROTATION(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def COPY_ROTATION(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) split = layout.split() @@ -421,10 +421,10 @@ class ConstraintButtonsPanel(bpy.types.Panel): layout.itemR(con, "offset") - self.space_template(layout, con, col2) + self.space_template(layout, con, wide_ui) - def COPY_LOCATION(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def COPY_LOCATION(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) split = layout.split() @@ -448,10 +448,10 @@ class ConstraintButtonsPanel(bpy.types.Panel): layout.itemR(con, "offset") - self.space_template(layout, con, col2) + self.space_template(layout, con, wide_ui) - def COPY_SCALE(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def COPY_SCALE(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) row = layout.row(align=True) row.itemR(con, "size_like_x", text="X") @@ -460,19 +460,19 @@ class ConstraintButtonsPanel(bpy.types.Panel): layout.itemR(con, "offset") - self.space_template(layout, con, col2) + self.space_template(layout, con, wide_ui) #def SCRIPT(self, context, layout, con): - def ACTION(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def ACTION(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) - if col2: + if wide_ui: layout.itemR(con, "action") else: layout.itemR(con, "action", text="") - if col2: + if wide_ui: layout.itemR(con, "transform_channel") else: layout.itemR(con, "transform_channel", text="") @@ -484,32 +484,32 @@ class ConstraintButtonsPanel(bpy.types.Panel): col.itemR(con, "start_frame", text="Start") col.itemR(con, "end_frame", text="End") - if col2: + if wide_ui: col = split.column(align=True) col.itemL(text="Target Range:") col.itemR(con, "minimum", text="Min") col.itemR(con, "maximum", text="Max") row = layout.row() - if col2: + if wide_ui: row.itemL(text="Convert:") row.itemR(con, "target_space", text="") - def LOCKED_TRACK(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def LOCKED_TRACK(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) row = layout.row() - if col2: + if wide_ui: row.itemL(text="To:") row.itemR(con, "track", expand=True) row = layout.row() - if col2: + if wide_ui: row.itemL(text="Lock:") row.itemR(con, "locked", expand=True) - def LIMIT_DISTANCE(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def LIMIT_DISTANCE(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) col = layout.column(align=True) col.itemR(con, "distance") @@ -519,15 +519,15 @@ class ConstraintButtonsPanel(bpy.types.Panel): row.itemL(text="Clamp Region:") row.itemR(con, "limit_mode", text="") - def STRETCH_TO(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def STRETCH_TO(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) split = layout.split() col = split.column() col.itemR(con, "original_length", text="Rest Length") - if col2: + if wide_ui: col = split.column() col.itemO("constraint.stretchto_reset", text="Reset") @@ -535,41 +535,41 @@ class ConstraintButtonsPanel(bpy.types.Panel): col.itemR(con, "bulge", text="Volume Variation") row = layout.row() - if col2: + if wide_ui: row.itemL(text="Volume:") row.itemR(con, "volume", expand=True) - if not col2: + if not wide_ui: row = layout.row() row.itemL(text="Plane:") row.itemR(con, "keep_axis", expand=True) - def FLOOR(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def FLOOR(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) split = layout.split() col = split.column() col.itemR(con, "sticky") - if col2: + if wide_ui: col = split.column() col.itemR(con, "use_rotation") layout.itemR(con, "offset") row = layout.row() - if col2: + if wide_ui: row.itemL(text="Min/Max:") row.itemR(con, "floor_location", expand=True) - def RIGID_BODY_JOINT(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def RIGID_BODY_JOINT(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) - if col2: + if wide_ui: layout.itemR(con, "pivot_type") else: layout.itemR(con, "pivot_type", text="") - if col2: + if wide_ui: layout.itemR(con, "child") else: layout.itemR(con, "child", text="") @@ -579,7 +579,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): col = split.column() col.itemR(con, "disable_linked_collision", text="No Collision") - if col2: + if wide_ui: col = split.column() col.itemR(con, "draw_pivot", text="Display Pivot") @@ -591,7 +591,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): col.itemR(con, "pivot_y", text="Y") col.itemR(con, "pivot_z", text="Z") - if col2: + if wide_ui: col = split.column(align=True) col.itemL(text="Axis:") col.itemR(con, "axis_x", text="X") @@ -600,19 +600,19 @@ class ConstraintButtonsPanel(bpy.types.Panel): #Missing: Limit arrays (not wrapped in RNA yet) - def CLAMP_TO(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def CLAMP_TO(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) row = layout.row() - if col2: + if wide_ui: row.itemL(text="Main Axis:") row.itemR(con, "main_axis", expand=True) row = layout.row() row.itemR(con, "cyclic") - def TRANSFORM(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def TRANSFORM(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) layout.itemR(con, "extrapolate_motion", text="Extrapolate") @@ -627,13 +627,13 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.itemR(con, "from_min_x", text="Min") sub.itemR(con, "from_max_x", text="Max") - if col2: + if wide_ui: sub = split.column(align=True) sub.itemL(text="Y:") sub.itemR(con, "from_min_y", text="Min") sub.itemR(con, "from_max_y", text="Max") - if col2: + if wide_ui: sub = split.column(align=True) sub.itemL(text="Z:") sub.itemR(con, "from_min_z", text="Min") @@ -655,7 +655,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.itemR(con, "to_min_x", text="Min") sub.itemR(con, "to_max_x", text="Max") - if col2: + if wide_ui: col = split.column() col.itemL(text="Y:") col.row().itemR(con, "map_to_y_from", expand=True) @@ -664,7 +664,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.itemR(con, "to_min_y", text="Min") sub.itemR(con, "to_max_y", text="Max") - if col2: + if wide_ui: col = split.column() col.itemL(text="Z:") col.row().itemR(con, "map_to_z_from", expand=True) @@ -673,10 +673,10 @@ class ConstraintButtonsPanel(bpy.types.Panel): sub.itemR(con, "to_min_z", text="Min") sub.itemR(con, "to_max_z", text="Max") - self.space_template(layout, con, col2) + self.space_template(layout, con, wide_ui) - def SHRINKWRAP(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def SHRINKWRAP(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) layout.itemR(con, "distance") layout.itemR(con, "shrinkwrap_type") @@ -687,16 +687,16 @@ class ConstraintButtonsPanel(bpy.types.Panel): row.itemR(con, "axis_y") row.itemR(con, "axis_z") - def DAMPED_TRACK(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def DAMPED_TRACK(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) row = layout.row() - if col2: + if wide_ui: row.itemL(text="To:") row.itemR(con, "track", expand=True) - def SPLINE_IK(self, context, layout, con, col2): - self.target_template(layout, con, col2) + def SPLINE_IK(self, context, layout, con, wide_ui): + self.target_template(layout, con, wide_ui) col = layout.column() col.itemL(text="Spline Fitting:") @@ -707,7 +707,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): col = layout.column() col.itemL(text="Chain Scaling:") col.itemR(con, "y_scaling") - if col2: + if wide_ui: col.itemR(con, "xz_scaling_mode") else: col.itemR(con, "xz_scaling_mode", text="") @@ -723,11 +723,11 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel): def draw(self, context): layout = self.layout ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui row = layout.row() row.item_menu_enumO("object.constraint_add", "type") - if col2: + if wide_ui: row.itemL() for con in ob.constraints: @@ -755,7 +755,7 @@ class BONE_PT_inverse_kinematics(ConstraintButtonsPanel): ob = context.object bone = context.bone pchan = ob.pose.bones[bone.name] - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui row = layout.row() row.itemR(ob.pose, "ik_solver") @@ -766,14 +766,14 @@ class BONE_PT_inverse_kinematics(ConstraintButtonsPanel): row.itemR(pchan, "ik_stiffness_x", text="Stiffness", slider=True) row.active = pchan.ik_dof_x - if col2: + if wide_ui: split = layout.split(percentage=0.25) sub = split.row() else: sub = layout.column(align=True) sub.itemR(pchan, "ik_limit_x", text="Limit") sub.active = pchan.ik_dof_x - if col2: + if wide_ui: sub = split.row(align=True) sub.itemR(pchan, "ik_min_x", text="") sub.itemR(pchan, "ik_max_x", text="") @@ -785,14 +785,14 @@ class BONE_PT_inverse_kinematics(ConstraintButtonsPanel): row.itemR(pchan, "ik_stiffness_y", text="Stiffness", slider=True) row.active = pchan.ik_dof_y - if col2: + if wide_ui: split = layout.split(percentage=0.25) sub = split.row() else: sub = layout.column(align=True) sub.itemR(pchan, "ik_limit_y", text="Limit") sub.active = pchan.ik_dof_y - if col2: + if wide_ui: sub = split.row(align=True) sub.itemR(pchan, "ik_min_y", text="") sub.itemR(pchan, "ik_max_y", text="") @@ -804,28 +804,28 @@ class BONE_PT_inverse_kinematics(ConstraintButtonsPanel): sub.itemR(pchan, "ik_stiffness_z", text="Stiffness", slider=True) sub.active = pchan.ik_dof_z - if col2: + if wide_ui: split = layout.split(percentage=0.25) sub = split.row() else: sub = layout.column(align=True) sub.itemR(pchan, "ik_limit_z", text="Limit") sub.active = pchan.ik_dof_z - if col2: + if wide_ui: sub = split.row(align=True) sub.itemR(pchan, "ik_min_z", text="") sub.itemR(pchan, "ik_max_z", text="") sub.active = pchan.ik_dof_z and pchan.ik_limit_z split = layout.split() split.itemR(pchan, "ik_stretch", text="Stretch", slider=True) - if col2: + if wide_ui: split.itemL() if ob.pose.ik_solver == 'ITASC': split = layout.split() col = split.column() col.itemR(pchan, "ik_rot_control", text="Control Rotation") - if col2: + if wide_ui: col = split.column() col.itemR(pchan, "ik_rot_weight", text="Weight", slider=True) # not supported yet @@ -854,7 +854,7 @@ class BONE_PT_iksolver_itasc(ConstraintButtonsPanel): ob = context.object itasc = ob.pose.ik_param - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(itasc, "mode", expand=True) simulation = itasc.mode == 'SIMULATION' @@ -867,7 +867,7 @@ class BONE_PT_iksolver_itasc(ConstraintButtonsPanel): col = split.column() col.itemR(itasc, "precision") - if col2: + if wide_ui: col = split.column() col.itemR(itasc, "num_iter") @@ -904,11 +904,11 @@ class BONE_PT_constraints(ConstraintButtonsPanel): ob = context.object pchan = ob.pose.bones[context.bone.name] - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui row = layout.row() row.item_menu_enumO("pose.constraint_add", "type") - if col2: + if wide_ui: row.itemL() for con in pchan.constraints: diff --git a/release/scripts/ui/properties_physics_cloth.py b/release/scripts/ui/properties_physics_cloth.py index 83c113e347b..2dc818ab149 100644 --- a/release/scripts/ui/properties_physics_cloth.py +++ b/release/scripts/ui/properties_physics_cloth.py @@ -49,7 +49,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel): md = context.cloth ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() split.operator_context = 'EXEC_DEFAULT' @@ -65,7 +65,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel): else: # add modifier split.item_enumO("object.modifier_add", "type", 'CLOTH', text="Add") - if col2: + if wide_ui: split.column() if md: @@ -88,7 +88,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel): col.itemR(cloth, "structural_stiffness", text="Structural") col.itemR(cloth, "bending_stiffness", text="Bending") - if col2: + if wide_ui: col = split.column() col.itemL(text="Damping:") @@ -146,7 +146,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel): cloth = context.cloth.collision_settings md = context.cloth - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = cloth.enable_collision and cloth_panel_enabled(md) @@ -157,7 +157,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel): col.itemR(cloth, "min_distance", slider=True, text="Distance") col.itemR(cloth, "friction") - if col2: + if wide_ui: col = split.column() col.itemR(cloth, "enable_self_collision", text="Self Collision") sub = col.column() @@ -185,7 +185,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel): md = context.cloth ob = context.object cloth = context.cloth.settings - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = cloth.stiffness_scaling and cloth_panel_enabled(md) @@ -196,7 +196,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel): col.item_pointerR(cloth, "structural_stiffness_vertex_group", ob, "vertex_groups", text="") col.itemR(cloth, "structural_stiffness_max", text="Max") - if col2: + if wide_ui: col = split.column() col.itemL(text="Bending Stiffness:") col.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="") diff --git a/release/scripts/ui/properties_physics_common.py b/release/scripts/ui/properties_physics_common.py index 2c04ff0c7c1..b8ecc74602e 100644 --- a/release/scripts/ui/properties_physics_common.py +++ b/release/scripts/ui/properties_physics_common.py @@ -24,7 +24,7 @@ narrowui = 180 def point_cache_ui(self, context, cache, enabled, particles, smoke): layout = self.layout - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.set_context_pointer("PointCache", cache) row = layout.row() @@ -93,7 +93,7 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke): def effector_weights_ui(self, context, weights): layout = self.layout - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(weights, "group") @@ -102,7 +102,7 @@ def effector_weights_ui(self, context, weights): col = split.column() col.itemR(weights, "gravity", slider=True) - if col2: + if wide_ui: col = split.column() col.itemR(weights, "all", slider=True) @@ -118,7 +118,7 @@ def effector_weights_ui(self, context, weights): col.itemR(weights, "curveguide", slider=True) col.itemR(weights, "texture", slider=True) - if col2: + if wide_ui: col = split.column() col.itemR(weights, "harmonic", slider=True) col.itemR(weights, "charge", slider=True) @@ -131,7 +131,7 @@ def effector_weights_ui(self, context, weights): def basic_force_field_settings_ui(self, context, field): layout = self.layout - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -157,7 +157,7 @@ def basic_force_field_settings_ui(self, context, field): else: col.itemR(field, "flow") - if col2: + if wide_ui: col = split.column() col.itemR(field, "noise") col.itemR(field, "seed") @@ -171,7 +171,7 @@ def basic_force_field_settings_ui(self, context, field): col.itemR(field, "do_location") col.itemR(field, "do_rotation") - if col2: + if wide_ui: col = split.column() col.itemL(text="Collision:") col.itemR(field, "do_absorption") @@ -180,10 +180,10 @@ def basic_force_field_settings_ui(self, context, field): def basic_force_field_falloff_ui(self, context, field): layout = self.layout - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui # XXX: This doesn't update for some reason. - #if col2: + #if wide_ui: # split = layout.split() #else: split = layout.split(percentage=0.35) @@ -196,7 +196,7 @@ def basic_force_field_falloff_ui(self, context, field): col.itemR(field, "use_min_distance", text="Use Minimum") col.itemR(field, "use_max_distance", text="Use Maximum") - if col2: + if wide_ui: col = split.column() col.itemR(field, "falloff_power", text="Power") diff --git a/release/scripts/ui/properties_physics_field.py b/release/scripts/ui/properties_physics_field.py index 9e1146d4b52..237160030d5 100644 --- a/release/scripts/ui/properties_physics_field.py +++ b/release/scripts/ui/properties_physics_field.py @@ -44,9 +44,9 @@ class PHYSICS_PT_field(PhysicButtonsPanel): ob = context.object field = ob.field - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split(percentage=0.2) split.itemL(text="Type:") else: @@ -55,7 +55,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel): split.itemR(field, "type", text="") if field.type not in ('NONE', 'GUIDE', 'TEXTURE'): - if col2: + if wide_ui: split = layout.split(percentage=0.2) split.itemL(text="Shape:") else: @@ -73,7 +73,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel): col.itemR(field, "falloff_power") col.itemR(field, "guide_path_add") - if col2: + if wide_ui: col = split.column() col.itemL(text="Clumping:") col.itemR(field, "guide_clump_amount") @@ -97,7 +97,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel): col.itemR(field, "guide_kink_frequency") col.itemR(field, "guide_kink_shape") - if col2: + if wide_ui: col = split.column() col.itemR(field, "guide_kink_amplitude") @@ -108,7 +108,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel): col.itemR(field, "texture_mode", text="") col.itemR(field, "texture_nabla") - if col2: + if wide_ui: col = split.column() col.itemR(field, "use_coordinates") col.itemR(field, "root_coordinates") @@ -133,7 +133,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel): col.itemR(field, "use_radial_min", text="Use Minimum") col.itemR(field, "use_radial_max", text="Use Maximum") - if col2: + if wide_ui: col = split.column() col.itemR(field, "radial_falloff", text="Power") @@ -155,7 +155,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel): col.itemR(field, "use_radial_min", text="Use Minimum") col.itemR(field, "use_radial_max", text="Use Maximum") - if col2: + if wide_ui: col = split.column() col.itemR(field, "radial_falloff", text="Power") @@ -181,7 +181,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel): layout = self.layout md = context.collision - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() split.operator_context = 'EXEC_DEFAULT' @@ -190,7 +190,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel): # remove modifier + settings split.set_context_pointer("modifier", md) split.itemO("object.modifier_remove", text="Remove") - if col2: + if wide_ui: col = split.column() #row = split.row(align=True) @@ -202,7 +202,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel): else: # add modifier split.item_enumO("object.modifier_add", "type", 'COLLISION', text="Add") - if col2: + if wide_ui: split.itemL() coll = None @@ -228,7 +228,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel): sub.itemR(settings, "friction_factor", text="Factor", slider=True) sub.itemR(settings, "random_friction", text="Random", slider=True) - if col2: + if wide_ui: col = split.column() col.itemL(text="Soft Body and Cloth:") sub = col.column(align=True) diff --git a/release/scripts/ui/properties_physics_fluid.py b/release/scripts/ui/properties_physics_fluid.py index 2d3ab3fd63e..492f9879c00 100644 --- a/release/scripts/ui/properties_physics_fluid.py +++ b/release/scripts/ui/properties_physics_fluid.py @@ -40,7 +40,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): layout = self.layout md = context.fluid - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() split.operator_context = 'EXEC_DEFAULT' @@ -59,14 +59,14 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): else: # add modifier split.item_enumO("object.modifier_add", "type", 'FLUID_SIMULATION', text="Add") - if col2: + if wide_ui: split.itemL() fluid = None if fluid: - if col2: + if wide_ui: layout.itemR(fluid, "type") else: layout.itemR(fluid, "type", text="") @@ -81,7 +81,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): col.itemL(text="Render Display:") col.itemR(fluid, "render_display_mode", text="") - if col2: + if wide_ui: col = split.column() col.itemL(text="Required Memory: " + fluid.memory_estimate) col.itemR(fluid, "preview_resolution", text="Preview") @@ -96,7 +96,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): sub.itemR(fluid, "start_time", text="Start") sub.itemR(fluid, "end_time", text="End") - if col2: + if wide_ui: col = split.column() col.itemL() col.itemR(fluid, "generate_speed_vectors") @@ -112,7 +112,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): col.itemR(fluid, "volume_initialization", text="") col.itemR(fluid, "export_animated_mesh") - if col2: + if wide_ui: col = split.column() col.itemL(text="Initial Velocity:") col.itemR(fluid, "initial_velocity", text="") @@ -125,7 +125,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): col.itemR(fluid, "volume_initialization", text="") col.itemR(fluid, "export_animated_mesh") - if col2: + if wide_ui: col = split.column() col.itemL(text="Slip Type:") col.itemR(fluid, "slip_type", text="") @@ -144,7 +144,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): col.itemR(fluid, "export_animated_mesh") col.itemR(fluid, "local_coordinates") - if col2: + if wide_ui: col = split.column() col.itemL(text="Inflow Velocity:") col.itemR(fluid, "inflow_velocity", text="") @@ -157,7 +157,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): col.itemR(fluid, "volume_initialization", text="") col.itemR(fluid, "export_animated_mesh") - if col2: + if wide_ui: split.column() elif fluid.type == 'PARTICLE': @@ -168,7 +168,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): col.itemR(fluid, "particle_influence", text="Size") col.itemR(fluid, "alpha_influence", text="Alpha") - if col2: + if wide_ui: col = split.column() col.itemL(text="Type:") col.itemR(fluid, "drops") @@ -185,7 +185,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): col.itemR(fluid, "quality", slider=True) col.itemR(fluid, "reverse_frames") - if col2: + if wide_ui: col = split.column() col.itemL(text="Time:") sub = col.column(align=True) @@ -200,7 +200,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): sub.itemR(fluid, "attraction_strength", text="Strength") sub.itemR(fluid, "attraction_radius", text="Radius") - if col2: + if wide_ui: col = split.column() col.itemL(text="Velocity Force:") sub = col.column(align=True) @@ -220,7 +220,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel): layout = self.layout fluid = context.fluid.settings - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -230,7 +230,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel): col.itemL(text="Real World Size:") col.itemR(fluid, "real_world_size", text="Metres") - if col2: + if wide_ui: col = split.column() col.itemL(text="Viscosity Presets:") sub = col.column(align=True) @@ -257,7 +257,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel): layout = self.layout fluid = context.fluid.settings - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -267,7 +267,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel): if fluid.slip_type == 'PARTIALSLIP': col.itemR(fluid, "partial_slip_factor", slider=True, text="Amount") - if col2: + if wide_ui: col = split.column() col.itemL(text="Surface:") col.itemR(fluid, "surface_smoothing", text="Smoothing") diff --git a/release/scripts/ui/properties_physics_smoke.py b/release/scripts/ui/properties_physics_smoke.py index 860d18516b9..c90e6c50bd9 100644 --- a/release/scripts/ui/properties_physics_smoke.py +++ b/release/scripts/ui/properties_physics_smoke.py @@ -45,7 +45,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel): md = context.smoke ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() split.operator_context = 'EXEC_DEFAULT' @@ -62,11 +62,11 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel): else: # add modifier split.item_enumO("object.modifier_add", "type", 'SMOKE', text="Add") - if col2: + if wide_ui: split.itemL() if md: - if col2: + if wide_ui: layout.itemR(md, "smoke_type", expand=True) else: layout.itemR(md, "smoke_type", text="") @@ -81,7 +81,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel): col.itemL(text="Resolution:") col.itemR(domain, "maxres", text="Divisions") - if col2: + if wide_ui: col = split.column() col.itemL(text="Behavior:") col.itemR(domain, "alpha") @@ -104,10 +104,10 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel): col.item_pointerR(flow, "psys", ob, "particle_systems", text="") if md.flow_settings.outflow: - if col2: + if wide_ui: col = split.column() else: - if col2: + if wide_ui: col = split.column() col.itemL(text="Behavior:") col.itemR(flow, "temperature") @@ -129,7 +129,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel): layout = self.layout group = context.smoke.domain_settings - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -140,7 +140,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel): #col.itemL(text="Effector Group:") #col.itemR(group, "eff_group", text="") - if col2: + if wide_ui: col = split.column() col.itemL(text="Collision Group:") col.itemR(group, "coll_group", text="") @@ -178,7 +178,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel): layout = self.layout md = context.smoke.domain_settings - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -187,7 +187,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel): col.itemR(md, "amplify", text="Divisions") col.itemR(md, "viewhighres") - if col2: + if wide_ui: col = split.column() col.itemL(text="Noise Method:") col.row().itemR(md, "noise_type", text="") diff --git a/release/scripts/ui/properties_physics_softbody.py b/release/scripts/ui/properties_physics_softbody.py index 2675b3ed9fb..8a7d65b7d8c 100644 --- a/release/scripts/ui/properties_physics_softbody.py +++ b/release/scripts/ui/properties_physics_softbody.py @@ -49,7 +49,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel): md = context.soft_body ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() split.operator_context = 'EXEC_DEFAULT' @@ -65,7 +65,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel): else: # add modifier split.item_enumO("object.modifier_add", "type", 'SOFT_BODY', text="Add") - if col2: + if wide_ui: split.column() if md: @@ -81,7 +81,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel): col.itemR(softbody, "mass") col.item_pointerR(softbody, "mass_vertex_group", ob, "vertex_groups", text="Mass:") - if col2: + if wide_ui: col = split.column() col.itemL(text="Simulation:") col.itemR(softbody, "speed") @@ -118,7 +118,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel): md = context.soft_body softbody = md.settings ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = softbody.use_goal and softbody_panel_enabled(md) @@ -134,7 +134,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel): sub.itemR(softbody, "goal_min", text="Minimum") sub.itemR(softbody, "goal_max", text="Maximum") - if col2: + if wide_ui: col = split.column() col.itemL(text="Goal Settings:") col.itemR(softbody, "goal_spring", text="Stiffness") @@ -162,7 +162,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel): md = context.soft_body softbody = md.settings ob = context.object - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = softbody.use_edges and softbody_panel_enabled(md) @@ -178,7 +178,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel): col.itemR(softbody, "spring_length", text="Length") col.item_pointerR(softbody, "spring_vertex_group", ob, "vertex_groups", text="Springs:") - if col2: + if wide_ui: col = split.column() col.itemR(softbody, "stiff_quads") sub = col.column() @@ -213,12 +213,12 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel): md = context.soft_body softbody = md.settings - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = softbody.self_collision and softbody_panel_enabled(md) layout.itemL(text="Collision Type:") - if col2: + if wide_ui: layout.itemR(softbody, "collision_type", expand=True) else: layout.itemR(softbody, "collision_type", text="") @@ -242,7 +242,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel): md = context.soft_body softbody = md.settings - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = softbody_panel_enabled(md) @@ -255,7 +255,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel): col.itemR(softbody, "maxstep") col.itemR(softbody, "auto_step", text="Auto-Step") - if col2: + if wide_ui: col = split.column() col.itemR(softbody, "error_limit") col.itemL(text="Helpers:") diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py index 5d26f5098f9..42faa00fe00 100644 --- a/release/scripts/ui/properties_render.py +++ b/release/scripts/ui/properties_render.py @@ -41,14 +41,14 @@ class RENDER_PT_render(RenderButtonsPanel): layout = self.layout rd = context.scene.render_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() col = split.column() col.itemO("screen.render", text="Image", icon='ICON_RENDER_STILL') - if col2: + if wide_ui: col = split.column() col.item_booleanO("screen.render", "animation", True, text="Animation", icon='ICON_RENDER_ANIMATION') @@ -65,7 +65,7 @@ class RENDER_PT_layers(RenderButtonsPanel): scene = context.scene rd = scene.render_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui row = layout.row() row.template_list(rd, "layers", rd, "active_layer_index", rows=2) @@ -83,7 +83,7 @@ class RENDER_PT_layers(RenderButtonsPanel): col = split.column() col.itemR(scene, "visible_layers", text="Scene") - if col2: + if wide_ui: col = split.column() col.itemR(rl, "visible_layers", text="Layer") @@ -131,7 +131,7 @@ class RENDER_PT_layers(RenderButtonsPanel): col.itemR(rl, "pass_mist") col.itemR(rl, "pass_object_index") - if col2: + if wide_ui: col = split.column() col.itemL() col.itemR(rl, "pass_color") @@ -161,7 +161,7 @@ class RENDER_PT_shading(RenderButtonsPanel): layout = self.layout rd = context.scene.render_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -171,7 +171,7 @@ class RENDER_PT_shading(RenderButtonsPanel): col.itemR(rd, "render_sss", text="Subsurface Scattering") col.itemR(rd, "render_envmaps", text="Environment Map") - if col2: + if wide_ui: col = split.column() col.itemR(rd, "render_raytracing", text="Ray Tracing") col.itemR(rd, "color_management") @@ -187,7 +187,7 @@ class RENDER_PT_performance(RenderButtonsPanel): layout = self.layout rd = context.scene.render_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -201,7 +201,7 @@ class RENDER_PT_performance(RenderButtonsPanel): col.itemR(rd, "parts_x", text="X") col.itemR(rd, "parts_y", text="Y") - if col2: + if wide_ui: col = split.column() col.itemL(text="Memory:") sub = col.column() @@ -230,7 +230,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel): layout = self.layout rd = context.scene.render_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -238,7 +238,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel): col.itemR(rd, "use_compositing") col.itemR(rd, "use_sequencer") - if col2: + if wide_ui: col = split.column() col.itemR(rd, "dither_intensity", text="Dither", slider=True) @@ -254,7 +254,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel): sub.itemR(rd, "fields_still", text="Still") - if col2: + if wide_ui: col = split.column() else: col.itemS() @@ -273,7 +273,7 @@ class RENDER_PT_output(RenderButtonsPanel): layout = self.layout rd = context.scene.render_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(rd, "output_path", text="") @@ -282,7 +282,7 @@ class RENDER_PT_output(RenderButtonsPanel): col.itemR(rd, "file_format", text="") col.row().itemR(rd, "color_mode", text="Color", expand=True) - if col2: + if wide_ui: col = split.column() col.itemR(rd, "file_extensions") col.itemR(rd, "use_overwrite") @@ -299,13 +299,13 @@ class RENDER_PT_output(RenderButtonsPanel): col.itemL(text="Codec:") col.itemR(rd, "exr_codec", text="") - if col2: + if wide_ui: subsplit = split.split() col = subsplit.column() col.itemR(rd, "exr_half") col.itemR(rd, "exr_zbuf") - if col2: + if wide_ui: col = subsplit.column() col.itemR(rd, "exr_preview") @@ -315,7 +315,7 @@ class RENDER_PT_output(RenderButtonsPanel): col.itemL(text="Depth:") col.row().itemR(rd, "jpeg2k_depth", expand=True) - if col2: + if wide_ui: col = split.column() col.itemR(rd, "jpeg2k_preset", text="") col.itemR(rd, "jpeg2k_ycc") @@ -325,7 +325,7 @@ class RENDER_PT_output(RenderButtonsPanel): col = split.column() col.itemR(rd, "cineon_log", text="Convert to Log") - if col2: + if wide_ui: col = split.column(align=True) col.active = rd.cineon_log col.itemR(rd, "cineon_black", text="Black") @@ -350,7 +350,7 @@ class RENDER_PT_encoding(RenderButtonsPanel): layout = self.layout rd = context.scene.render_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -369,7 +369,7 @@ class RENDER_PT_encoding(RenderButtonsPanel): col.itemR(rd, "ffmpeg_maxrate", text="Maximum") col.itemR(rd, "ffmpeg_buffersize", text="Buffer") - if col2: + if wide_ui: col = split.column() col.itemR(rd, "ffmpeg_gopsize") col.itemR(rd, "ffmpeg_autosplit") @@ -388,7 +388,7 @@ class RENDER_PT_encoding(RenderButtonsPanel): col.itemR(rd, "ffmpeg_audio_bitrate") col.itemR(rd, "ffmpeg_audio_mixrate") - if col2: + if wide_ui: col = split.column() col.itemR(rd, "ffmpeg_multiplex_audio") col.itemR(rd, "ffmpeg_audio_volume") @@ -407,7 +407,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel): layout = self.layout rd = context.scene.render_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = rd.antialiasing split = layout.split() @@ -416,7 +416,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel): col.row().itemR(rd, "antialiasing_samples", expand=True) col.itemR(rd, "full_sample") - if col2: + if wide_ui: col = split.column() col.itemR(rd, "pixel_filter", text="") col.itemR(rd, "filter_size", text="Size", slider=True) @@ -431,7 +431,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel): scene = context.scene rd = scene.render_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -452,7 +452,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel): sub.active = rd.use_border sub.itemR(rd, "crop_to_border", text="Crop") - if col2: + if wide_ui: col = split.column() sub = col.column(align=True) sub.itemL(text="Frame Range:") @@ -480,7 +480,7 @@ class RENDER_PT_stamp(RenderButtonsPanel): layout = self.layout rd = context.scene.render_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = rd.render_stamp @@ -497,7 +497,7 @@ class RENDER_PT_stamp(RenderButtonsPanel): col.itemR(rd, "stamp_marker", text="Marker") col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip") - if col2: + if wide_ui: col = split.column() col.active = rd.render_stamp col.itemR(rd, "stamp_foreground", slider=True) diff --git a/release/scripts/ui/properties_scene.py b/release/scripts/ui/properties_scene.py index b96445dcd90..3c1fbf01ad6 100644 --- a/release/scripts/ui/properties_scene.py +++ b/release/scripts/ui/properties_scene.py @@ -37,10 +37,10 @@ class SCENE_PT_scene(SceneButtonsPanel): def draw(self, context): layout = self.layout - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui scene = context.scene - if col2: + if wide_ui: layout.itemR(scene, "camera") layout.itemR(scene, "set", text="Background") else: @@ -54,7 +54,7 @@ class SCENE_PT_unit(SceneButtonsPanel): def draw(self, context): layout = self.layout - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui unit = context.scene.unit_settings col = layout.column() @@ -66,7 +66,7 @@ class SCENE_PT_unit(SceneButtonsPanel): col = split.column() col.itemR(unit, "scale_length", text="Scale") - if col2: + if wide_ui: col = split.column() col.itemR(unit, "use_separate") @@ -78,7 +78,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel): layout = self.layout scene = context.scene - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui row = layout.row() col = row.column() @@ -96,7 +96,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel): col.itemR(ks, "name") col.itemR(ks, "absolute") - if col2: + if wide_ui: col = row.column() col.itemL(text="Keyframing Settings:") col.itemR(ks, "insertkey_needed", text="Needed") @@ -114,7 +114,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel): scene = context.scene ks = scene.active_keying_set - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui row = layout.row() row.itemL(text="Paths:") @@ -144,7 +144,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel): if ksp.entire_array == False: col.itemR(ksp, "array_index") - if col2: + if wide_ui: col = row.column() col.itemL(text="F-Curve Grouping:") col.itemR(ksp, "grouping") @@ -163,11 +163,11 @@ class SCENE_PT_physics(SceneButtonsPanel): layout = self.layout scene = context.scene - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.active = scene.use_gravity - if col2: + if wide_ui: layout.itemR(scene, "gravity", text="") else: layout.column().itemR(scene, "gravity", text="") diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index 7cab499c0dc..54a5c79ced5 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -88,7 +88,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui idblock = context_tex_datablock(context) space = context.space_data @@ -103,7 +103,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel): col.item_enumO("texture.slot_move", "type", 'DOWN', text="", icon='ICON_TRIA_DOWN') - if col2: + if wide_ui: split = layout.split(percentage=0.65) if idblock: split.template_ID(idblock, "active_texture", new="texture.new") @@ -133,7 +133,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel): split.itemR(slot, "output_node", text="") else: - if col2: + if wide_ui: split.itemL(text="Type:") split.itemR(tex, "type", text="") else: @@ -148,7 +148,7 @@ class TEXTURE_PT_colors(TextureButtonsPanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(tex, "use_color_ramp", text="Ramp") if tex.use_color_ramp: @@ -163,7 +163,7 @@ class TEXTURE_PT_colors(TextureButtonsPanel): sub.itemR(tex, "factor_green", text="G") sub.itemR(tex, "factor_blue", text="B") - if col2: + if wide_ui: col = split.column() col.itemL(text="Adjust:") col.itemR(tex, "brightness") @@ -189,7 +189,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel): tex = context.texture_slot # textype = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui if type(idblock) != bpy.types.Brush: split = layout.split(percentage=0.3) @@ -243,10 +243,10 @@ class TEXTURE_PT_mapping(TextureSlotPanel): col.itemR(tex, "from_dupli") elif tex.texture_coordinates == 'OBJECT': col.itemR(tex, "from_original") - elif col2: + elif wide_ui: col.itemL() - if col2: + if wide_ui: col = split.column() row = col.row() row.itemR(tex, "x_mapping", text="") @@ -259,7 +259,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel): col = split.column() col.itemR(tex, "offset") - if col2: + if wide_ui: col = split.column() col.itemR(tex, "size") @@ -278,7 +278,7 @@ class TEXTURE_PT_influence(TextureSlotPanel): # textype = context.texture tex = context.texture_slot - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui def factor_but(layout, active, toggle, factor, name): row = layout.row(align=True) @@ -303,7 +303,7 @@ class TEXTURE_PT_influence(TextureSlotPanel): factor_but(col, tex.map_colorspec, "map_colorspec", "colorspec_factor", "Color") factor_but(col, tex.map_hardness, "map_hardness", "hardness_factor", "Hardness") - if col2: + if wide_ui: col = split.column() col.itemL(text="Shading:") factor_but(col, tex.map_ambient, "map_ambient", "ambient_factor", "Ambient") @@ -328,7 +328,7 @@ class TEXTURE_PT_influence(TextureSlotPanel): factor_but(col, tex.map_scattering, "map_scattering", "scattering_factor", "Scattering") factor_but(col, tex.map_reflection, "map_reflection", "reflection_factor", "Reflection") - if col2: + if wide_ui: col = split.column() col.itemL(text=" ") factor_but(col, tex.map_alpha, "map_coloremission", "coloremission_factor", "Emission Color") @@ -341,7 +341,7 @@ class TEXTURE_PT_influence(TextureSlotPanel): col = split.column() factor_but(col, tex.map_color, "map_color", "color_factor", "Color") - if col2: + if wide_ui: col = split.column() factor_but(col, tex.map_shadow, "map_shadow", "shadow_factor", "Shadow") @@ -352,7 +352,7 @@ class TEXTURE_PT_influence(TextureSlotPanel): factor_but(col, tex.map_blend, "map_blend", "blend_factor", "Blend") factor_but(col, tex.map_horizon, "map_horizon", "horizon_factor", "Horizon") - if col2: + if wide_ui: col = split.column() factor_but(col, tex.map_zenith_up, "map_zenith_up", "zenith_up_factor", "Zenith Up") factor_but(col, tex.map_zenith_down, "map_zenith_down", "zenith_down_factor", "Zenith Down") @@ -368,7 +368,7 @@ class TEXTURE_PT_influence(TextureSlotPanel): sub.active = tex.rgb_to_intensity sub.itemR(tex, "color", text="") - if col2: + if wide_ui: col = split.column() col.itemR(tex, "negate", text="Negative") col.itemR(tex, "stencil") @@ -394,12 +394,12 @@ class TEXTURE_PT_clouds(TextureTypePanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(tex, "stype", expand=True) layout.itemL(text="Noise:") layout.itemR(tex, "noise_type", text="Type", expand=True) - if col2: + if wide_ui: layout.itemR(tex, "noise_basis", text="Basis") else: layout.itemR(tex, "noise_basis", text="") @@ -410,7 +410,7 @@ class TEXTURE_PT_clouds(TextureTypePanel): col.itemR(tex, "noise_size", text="Size") col.itemR(tex, "noise_depth", text="Depth") - if col2: + if wide_ui: col = split.column() col.itemR(tex, "nabla", text="Nabla") @@ -423,10 +423,10 @@ class TEXTURE_PT_wood(TextureTypePanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(tex, "noisebasis2", expand=True) - if col2: + if wide_ui: layout.itemR(tex, "stype", expand=True) else: layout.itemR(tex, "stype", text="") @@ -435,7 +435,7 @@ class TEXTURE_PT_wood(TextureTypePanel): col.active = tex.stype in ('RINGNOISE', 'BANDNOISE') col.itemL(text="Noise:") col.row().itemR(tex, "noise_type", text="Type", expand=True) - if col2: + if wide_ui: layout.itemR(tex, "noise_basis", text="Basis") else: layout.itemR(tex, "noise_basis", text="") @@ -459,13 +459,13 @@ class TEXTURE_PT_marble(TextureTypePanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(tex, "stype", expand=True) layout.itemR(tex, "noisebasis2", expand=True) layout.itemL(text="Noise:") layout.itemR(tex, "noise_type", text="Type", expand=True) - if col2: + if wide_ui: layout.itemR(tex, "noise_basis", text="Basis") else: layout.itemR(tex, "noise_basis", text="") @@ -476,7 +476,7 @@ class TEXTURE_PT_marble(TextureTypePanel): col.itemR(tex, "noise_size", text="Size") col.itemR(tex, "noise_depth", text="Depth") - if col2: + if wide_ui: col = split.column() col.itemR(tex, "turbulence") col.itemR(tex, "nabla") @@ -490,14 +490,14 @@ class TEXTURE_PT_magic(TextureTypePanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() col = split.column() col.itemR(tex, "noise_depth", text="Depth") - if col2: + if wide_ui: col = split.column() col.itemR(tex, "turbulence") @@ -510,9 +510,9 @@ class TEXTURE_PT_blend(TextureTypePanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(tex, "progression") else: layout.itemR(tex, "progression", text="") @@ -531,12 +531,12 @@ class TEXTURE_PT_stucci(TextureTypePanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui layout.itemR(tex, "stype", expand=True) layout.itemL(text="Noise:") layout.itemR(tex, "noise_type", text="Type", expand=True) - if col2: + if wide_ui: layout.itemR(tex, "noise_basis", text="Basis") else: layout.itemR(tex, "noise_basis", text="") @@ -546,7 +546,7 @@ class TEXTURE_PT_stucci(TextureTypePanel): col = split.column() col.itemR(tex, "noise_size", text="Size") - if col2: + if wide_ui: col = split.column() col.itemR(tex, "turbulence") @@ -573,7 +573,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel): tex = context.texture # slot = context.texture_slot - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -585,7 +585,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel): col.itemS() col.itemR(tex, "flip_axis", text="Flip X/Y Axis") - if col2: + if wide_ui: col = split.column() else: col.itemS() @@ -621,9 +621,9 @@ class TEXTURE_PT_image_mapping(TextureTypePanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(tex, "extension") else: layout.itemR(tex, "extension", text="") @@ -636,7 +636,7 @@ class TEXTURE_PT_image_mapping(TextureTypePanel): col.itemR(tex, "repeat_x", text="X") col.itemR(tex, "repeat_y", text="Y") - if col2: + if wide_ui: col = split.column(align=True) col.itemL(text="Mirror:") col.itemR(tex, "mirror_x", text="X") @@ -649,7 +649,7 @@ class TEXTURE_PT_image_mapping(TextureTypePanel): row.itemR(tex, "checker_even", text="Even") row.itemR(tex, "checker_odd", text="Odd") - if col2: + if wide_ui: col = split.column() col.itemR(tex, "checker_distance", text="Distance") @@ -663,7 +663,7 @@ class TEXTURE_PT_image_mapping(TextureTypePanel): col.itemR(tex, "crop_min_x", text="X") col.itemR(tex, "crop_min_y", text="Y") - if col2: + if wide_ui: col = split.column(align=True) col.itemL(text="Crop Maximum:") col.itemR(tex, "crop_max_x", text="X") @@ -702,9 +702,9 @@ class TEXTURE_PT_musgrave(TextureTypePanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(tex, "musgrave_type") else: layout.itemR(tex, "musgrave_type", text="") @@ -716,7 +716,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel): col.itemR(tex, "lacunarity") col.itemR(tex, "octaves") - if col2: + if wide_ui: col = split.column() if (tex.musgrave_type in ('HETERO_TERRAIN', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')): col.itemR(tex, "offset") @@ -726,7 +726,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel): layout.itemL(text="Noise:") - if col2: + if wide_ui: layout.itemR(tex, "noise_basis", text="Basis") else: layout.itemR(tex, "noise_basis", text="") @@ -736,7 +736,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel): col = split.column() col.itemR(tex, "noise_size", text="Size") - if col2: + if wide_ui: col = split.column() col.itemR(tex, "nabla") @@ -749,7 +749,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -763,7 +763,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel): col.itemR(tex, "coloring", text="") col.itemR(tex, "noise_intensity", text="Intensity") - if col2: + if wide_ui: col = split.column() sub = col.column(align=True) sub.itemL(text="Feature Weights:") @@ -779,7 +779,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel): col = split.column() col.itemR(tex, "noise_size", text="Size") - if col2: + if wide_ui: col = split.column() col.itemR(tex, "nabla") @@ -792,9 +792,9 @@ class TEXTURE_PT_distortednoise(TextureTypePanel): layout = self.layout tex = context.texture - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(tex, "noise_distortion") layout.itemR(tex, "noise_basis", text="Basis") else: @@ -807,7 +807,7 @@ class TEXTURE_PT_distortednoise(TextureTypePanel): col.itemR(tex, "distortion", text="Distortion") col.itemR(tex, "noise_size", text="Size") - if col2: + if wide_ui: col = split.column() col.itemR(tex, "nabla") @@ -855,9 +855,9 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel): tex = context.texture pd = tex.pointdensity - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: layout.itemR(pd, "point_source", expand=True) else: layout.itemR(pd, "point_source", text="") @@ -891,7 +891,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel): if pd.color_source in ('PARTICLE_SPEED', 'PARTICLE_AGE'): layout.template_color_ramp(pd, "color_ramp", expand=True) - if col2: + if wide_ui: col = split.column() col.itemL() col.itemR(pd, "radius") @@ -922,7 +922,7 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel): tex = context.texture pd = tex.pointdensity layout.active = pd.turbulence - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -932,7 +932,7 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel): col.itemL(text="Noise Basis:") col.itemR(pd, "noise_basis", text="") - if col2: + if wide_ui: col = split.column() col.itemL() col.itemR(pd, "turbulence_size") diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py index 35fe2dcdce1..5a9f8cc18b3 100644 --- a/release/scripts/ui/properties_world.py +++ b/release/scripts/ui/properties_world.py @@ -56,10 +56,10 @@ class WORLD_PT_context_world(WorldButtonsPanel): scene = context.scene world = context.world space = context.space_data - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui - if col2: + if wide_ui: split = layout.split(percentage=0.65) if scene: split.template_ID(scene, "world", new="world.new") @@ -75,10 +75,10 @@ class WORLD_PT_world(WorldButtonsPanel): def draw(self, context): layout = self.layout - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui world = context.world - if col2: + if wide_ui: row = layout.row() row.itemR(world, "paper_sky") row.itemR(world, "blend_sky") @@ -108,7 +108,7 @@ class WORLD_PT_mist(WorldButtonsPanel): def draw(self, context): layout = self.layout - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui world = context.world layout.active = world.mist.enabled @@ -119,7 +119,7 @@ class WORLD_PT_mist(WorldButtonsPanel): col.itemR(world.mist, "intensity", slider=True) col.itemR(world.mist, "start") - if col2: + if wide_ui: col = split.column() col.itemR(world.mist, "depth") col.itemR(world.mist, "height") @@ -138,7 +138,7 @@ class WORLD_PT_stars(WorldButtonsPanel): def draw(self, context): layout = self.layout - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui world = context.world layout.active = world.stars.enabled @@ -149,7 +149,7 @@ class WORLD_PT_stars(WorldButtonsPanel): col.itemR(world.stars, "size") col.itemR(world.stars, "color_randomization", text="Colors") - if col2: + if wide_ui: col = split.column() col.itemR(world.stars, "min_distance", text="Min. Dist") col.itemR(world.stars, "average_separation", text="Separation") @@ -166,7 +166,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel): def draw(self, context): layout = self.layout - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui ao = context.world.ambient_occlusion layout.active = ao.enabled @@ -185,7 +185,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel): sub.itemR(ao, "falloff_strength", text="Strength") if ao.gather_method == 'RAYTRACE': - if col2: + if wide_ui: col = split.column() col.itemL(text="Sampling:") @@ -201,7 +201,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel): sub.itemR(ao, "bias") if ao.gather_method == 'APPROXIMATE': - if col2: + if wide_ui: col = split.column() col.itemL(text="Sampling:") @@ -220,7 +220,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel): col = split.column() col.itemR(ao, "energy") - if col2: + if wide_ui: col = split.column() col.itemR(ao, "color") diff --git a/release/scripts/ui/space_image.py b/release/scripts/ui/space_image.py index a85741cd369..16208d5e0d5 100644 --- a/release/scripts/ui/space_image.py +++ b/release/scripts/ui/space_image.py @@ -329,7 +329,7 @@ class IMAGE_PT_game_properties(bpy.types.Panel): sima = context.space_data ima = sima.image - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -350,7 +350,7 @@ class IMAGE_PT_game_properties(bpy.types.Panel): sub.itemR(ima, "tiles_x", text="X") sub.itemR(ima, "tiles_y", text="Y") - if col2: + if wide_ui: col = split.column() col.itemL(text="Clamp:") col.itemR(ima, "clamp_x", text="X") @@ -375,7 +375,7 @@ class IMAGE_PT_view_properties(bpy.types.Panel): ima = sima.image show_uvedit = sima.show_uvedit uvedit = sima.uv_editor - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui split = layout.split() @@ -383,7 +383,7 @@ class IMAGE_PT_view_properties(bpy.types.Panel): if ima: col.itemR(ima, "display_aspect", text="Aspect Ratio") - if col2: + if wide_ui: col = split.column() col.itemL(text="Coordinates:") col.itemR(sima, "draw_repeated", text="Repeat") @@ -398,7 +398,7 @@ class IMAGE_PT_view_properties(bpy.types.Panel): col = layout.column() col.itemL(text="UVs:") row = col.row() - if col2: + if wide_ui: row.itemR(uvedit, "edge_draw_type", expand=True) else: row.itemR(uvedit, "edge_draw_type", text="") @@ -410,7 +410,7 @@ class IMAGE_PT_view_properties(bpy.types.Panel): #col.itemR(uvedit, "draw_edges") #col.itemR(uvedit, "draw_faces") - if col2: + if wide_ui: col = split.column() col.itemR(uvedit, "draw_stretch", text="Stretch") sub = col.column() @@ -431,7 +431,7 @@ class IMAGE_PT_paint(bpy.types.Panel): settings = context.tool_settings.image_paint brush = settings.brush - col2 = context.region.width > narrowui + wide_ui = context.region.width > narrowui col = layout.split().column() row = col.row() @@ -439,7 +439,7 @@ class IMAGE_PT_paint(bpy.types.Panel): col.template_ID(settings, "brush", new="brush.add") - if col2: + if wide_ui: sub = layout.row(align=True) else: sub = layout.column(align=True)