Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2009-09-27 15:00:35 +0400
committerThomas Dinges <blender@dingto.org>2009-09-27 15:00:35 +0400
commit2fef3dbaa3512f6561155402c46bf3ff8c955980 (patch)
tree4a9842e742b53691316c1238be73615b85545c4d /release
parent6e0c1cd4e5acaa91adbfd2137709a6803647cde7 (diff)
2.5 Layout Files:
* Some Code and Whitespace Cleanup.
Diffstat (limited to 'release')
-rw-r--r--release/io/engine_render_pov.py38
-rw-r--r--release/io/netrender/ui.py2
-rw-r--r--release/ui/buttons_data_armature.py3
-rw-r--r--release/ui/buttons_data_bone.py2
-rw-r--r--release/ui/buttons_data_camera.py5
-rw-r--r--release/ui/buttons_data_curve.py1
-rw-r--r--release/ui/buttons_data_lamp.py9
-rw-r--r--release/ui/buttons_data_lattice.py2
-rw-r--r--release/ui/buttons_data_mesh.py2
-rw-r--r--release/ui/buttons_data_metaball.py8
-rw-r--r--release/ui/buttons_data_text.py2
-rw-r--r--release/ui/buttons_game.py4
-rw-r--r--release/ui/buttons_material.py40
-rw-r--r--release/ui/buttons_object_constraint.py3
-rw-r--r--release/ui/buttons_physics_cloth.py6
-rw-r--r--release/ui/buttons_physics_field.py2
-rw-r--r--release/ui/buttons_physics_fluid.py9
-rw-r--r--release/ui/buttons_physics_smoke.py5
-rw-r--r--release/ui/buttons_physics_softbody.py10
-rw-r--r--release/ui/buttons_scene.py1
-rw-r--r--release/ui/buttons_texture.py7
-rw-r--r--release/ui/buttons_world.py7
-rw-r--r--release/ui/space_sequencer.py4
-rw-r--r--release/ui/space_view3d_toolbar.py19
24 files changed, 65 insertions, 126 deletions
diff --git a/release/io/engine_render_pov.py b/release/io/engine_render_pov.py
index 1c5026c84c0..f0247ce532a 100644
--- a/release/io/engine_render_pov.py
+++ b/release/io/engine_render_pov.py
@@ -110,8 +110,7 @@ def write_pov(filename, scene=None, info_callback = None):
file.write('\tdiffuse 0.8\n')
file.write('\tspecular 0.2\n')
-
-
+
# This is written into the object
'''
if material and material.transparency_method=='RAYTRACE':
@@ -143,9 +142,7 @@ def write_pov(filename, scene=None, info_callback = None):
file.write('\trotate <%.6f, %.6f, %.6f>\n' % tuple([degrees(e) for e in matrix.rotationPart().toEuler()]))
file.write('\ttranslate <%.6f, %.6f, %.6f>\n' % (matrix[3][0], matrix[3][1], matrix[3][2]))
file.write('}\n')
-
-
-
+
def exportLamps(lamps):
# Get all lamps
for ob in lamps:
@@ -186,9 +183,7 @@ def write_pov(filename, scene=None, info_callback = None):
else:
size_y = lamp.size_y
samples_y = lamp.shadow_ray_samples_y
-
-
-
+
file.write('\tarea_light <%d,0,0>,<0,0,%d> %d, %d\n' % (size_x, size_y, samples_x, samples_y))
if lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED':
if lamp.jitter:
@@ -264,10 +259,7 @@ def write_pov(filename, scene=None, info_callback = None):
writeMatrix(ob.matrix)
file.write('}\n')
-
-
-
-
+
def exportMeshs(sel):
ob_num = 0
@@ -475,8 +467,7 @@ def write_pov(filename, scene=None, info_callback = None):
file.write(',\n\t\t<%d,%d,%d>, %d,%d,%d' % (fv[i1], fv[i2], fv[i3], ci1, ci2, ci3)) # vert count
-
-
+
file.write('\n }\n')
# normal_indices indicies
@@ -589,7 +580,6 @@ def write_pov(filename, scene=None, info_callback = None):
file.close()
-
def write_pov_ini(filename_ini, filename_pov, filename_image):
scene = bpy.data.scenes[0]
render = scene.render_data
@@ -775,9 +765,7 @@ class PovrayRender(bpy.types.RenderEngine):
# compute resolution
x= int(r.resolution_x*r.resolution_percentage*0.01)
y= int(r.resolution_y*r.resolution_percentage*0.01)
-
-
-
+
# Wait for the file to be created
while not os.path.exists(self.temp_file_out):
if self.test_break():
@@ -876,12 +864,13 @@ class SCENE_PT_povray_radiosity(RenderButtonsPanel):
COMPAT_ENGINES = set(['POVRAY_RENDER'])
def draw_header(self, context):
- layout = self.layout
scene = context.scene
- layout.itemR(scene, "pov_radio_enable", text="")
+
+ self.layout.itemR(scene, "pov_radio_enable", text="")
def draw(self, context):
layout = self.layout
+
scene = context.scene
rd = scene.render_data
@@ -890,7 +879,6 @@ class SCENE_PT_povray_radiosity(RenderButtonsPanel):
split = layout.split()
col = split.column()
-
col.itemR(scene, "pov_radio_count", text="Rays")
col.itemR(scene, "pov_radio_recursion_limit", text="Recursions")
col = split.column()
@@ -905,15 +893,12 @@ class SCENE_PT_povray_radiosity(RenderButtonsPanel):
col.itemR(scene, "pov_radio_adc_bailout", slider=True)
col.itemR(scene, "pov_radio_gray_threshold", slider=True)
col.itemR(scene, "pov_radio_low_error_factor", slider=True)
-
-
-
+
col = split.column()
col.itemR(scene, "pov_radio_brightness")
col.itemR(scene, "pov_radio_minimum_reuse", text="Min Reuse")
col.itemR(scene, "pov_radio_nearest_count")
-
-
+
split = layout.split()
col = split.column()
@@ -923,6 +908,5 @@ class SCENE_PT_povray_radiosity(RenderButtonsPanel):
col = split.column()
col.itemR(scene, "pov_radio_always_sample")
-
bpy.types.register(SCENE_PT_povray_radiosity)
diff --git a/release/io/netrender/ui.py b/release/io/netrender/ui.py
index ddaf0e6854a..7681d4865e9 100644
--- a/release/io/netrender/ui.py
+++ b/release/io/netrender/ui.py
@@ -39,6 +39,7 @@ class SCENE_PT_network_settings(RenderButtonsPanel):
def draw(self, context):
layout = self.layout
+
scene = context.scene
rd = scene.render_data
@@ -69,6 +70,7 @@ class SCENE_PT_network_job(RenderButtonsPanel):
def draw(self, context):
layout = self.layout
+
scene = context.scene
rd = scene.render_data
diff --git a/release/ui/buttons_data_armature.py b/release/ui/buttons_data_armature.py
index 413deee362b..9344294ff9e 100644
--- a/release/ui/buttons_data_armature.py
+++ b/release/ui/buttons_data_armature.py
@@ -7,7 +7,7 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- return (context.armature)
+ return context.armature
class DATA_PT_context_arm(DataButtonsPanel):
__show_header__ = False
@@ -128,7 +128,6 @@ class DATA_PT_paths(DataButtonsPanel):
split = layout.split()
col = split.column()
-
sub = col.column(align=True)
if (arm.paths_type == 'CURRENT_FRAME'):
sub.itemR(arm, "path_before_current", text="Before")
diff --git a/release/ui/buttons_data_bone.py b/release/ui/buttons_data_bone.py
index dae969a7e5f..50ece679e27 100644
--- a/release/ui/buttons_data_bone.py
+++ b/release/ui/buttons_data_bone.py
@@ -240,7 +240,6 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel):
#row = split.row()
#row.itemR(pchan, "ik_lin_weight", text="Weight", slider=True)
#row.active = pchan.ik_lin_control
-
class BONE_PT_deform(BoneButtonsPanel):
__label__ = "Deform"
@@ -307,6 +306,7 @@ class BONE_PT_iksolver_itasc(BoneButtonsPanel):
def draw(self, context):
layout = self.layout
+
ob = context.object
itasc = ob.pose.ik_param
diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py
index 0ac9a88eb35..19d7dfef852 100644
--- a/release/ui/buttons_data_camera.py
+++ b/release/ui/buttons_data_camera.py
@@ -7,7 +7,7 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- return (context.camera)
+ return context.camera
class DATA_PT_context_camera(DataButtonsPanel):
__show_header__ = False
@@ -92,8 +92,7 @@ class DATA_PT_camera_display(DataButtonsPanel):
sub = col.column()
sub.active = cam.show_passepartout
sub.itemR(cam, "passepartout_alpha", text="Alpha", slider=True)
-
-
+
bpy.types.register(DATA_PT_context_camera)
bpy.types.register(DATA_PT_camera)
bpy.types.register(DATA_PT_camera_display)
diff --git a/release/ui/buttons_data_curve.py b/release/ui/buttons_data_curve.py
index 70904239d86..c715cfb5d93 100644
--- a/release/ui/buttons_data_curve.py
+++ b/release/ui/buttons_data_curve.py
@@ -120,7 +120,6 @@ class DATA_PT_geometry_curve(DataButtonsPanel):
col.itemL(text="Bevel Object:")
col.itemR(curve, "bevel_object", text="")
-
class DATA_PT_pathanim(DataButtonsPanelCurve):
__label__ = "Path Animation"
diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py
index 0dbda46bccf..86ca5beb9b5 100644
--- a/release/ui/buttons_data_lamp.py
+++ b/release/ui/buttons_data_lamp.py
@@ -7,7 +7,7 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- return (context.lamp)
+ return context.lamp
class DATA_PT_preview(DataButtonsPanel):
__label__ = "Preview"
@@ -87,8 +87,7 @@ class DATA_PT_sunsky(DataButtonsPanel):
lamp = context.lamp.sky
layout.itemR(lamp, "sky")
-
-
+
row = layout.row()
row.active = lamp.sky or lamp.atmosphere
row.itemR(lamp, "atmosphere_turbidity", text="Turbidity")
@@ -198,7 +197,7 @@ class DATA_PT_shadow(DataButtonsPanel):
sub.itemR(lamp, "dither")
sub.itemR(lamp, "jitter")
- if lamp.shadow_method == 'BUFFER_SHADOW':
+ elif lamp.shadow_method == 'BUFFER_SHADOW':
col = layout.column()
col.itemL(text="Buffer Type:")
col.row().itemR(lamp, "shadow_buffer_type", expand=True)
@@ -258,8 +257,6 @@ class DATA_PT_area(DataButtonsPanel):
elif (lamp.shape == 'RECTANGLE'):
sub.itemR(lamp, "size", text="Size X")
sub.itemR(lamp, "size_y", text="Size Y")
-
- col = split.column()
class DATA_PT_spot(DataButtonsPanel):
__label__ = "Spot Shape"
diff --git a/release/ui/buttons_data_lattice.py b/release/ui/buttons_data_lattice.py
index 895c1a65bea..bc977860330 100644
--- a/release/ui/buttons_data_lattice.py
+++ b/release/ui/buttons_data_lattice.py
@@ -7,7 +7,7 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- return (context.lattice)
+ return context.lattice
class DATA_PT_context_lattice(DataButtonsPanel):
__show_header__ = False
diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py
index a93d7b66397..780ae3ac8f9 100644
--- a/release/ui/buttons_data_mesh.py
+++ b/release/ui/buttons_data_mesh.py
@@ -7,7 +7,7 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- return (context.mesh)
+ return context.mesh
class DATA_PT_context_mesh(DataButtonsPanel):
__show_header__ = False
diff --git a/release/ui/buttons_data_metaball.py b/release/ui/buttons_data_metaball.py
index 88c0066c67f..757546fdf8a 100644
--- a/release/ui/buttons_data_metaball.py
+++ b/release/ui/buttons_data_metaball.py
@@ -6,7 +6,7 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- return (context.meta_ball)
+ return context.meta_ball
class DATA_PT_context_metaball(DataButtonsPanel):
__show_header__ = False
@@ -74,11 +74,9 @@ class DATA_PT_metaball_element(DataButtonsPanel):
col.itemR(metaelem, "hide", text="Hide")
if metaelem.type == 'BALL':
-
col = split.column(align=True)
elif metaelem.type == 'CUBE':
-
col = split.column(align=True)
col.itemL(text="Size:")
col.itemR(metaelem, "size_x", text="X")
@@ -86,26 +84,22 @@ class DATA_PT_metaball_element(DataButtonsPanel):
col.itemR(metaelem, "size_z", text="Z")
elif metaelem.type == 'TUBE':
-
col = split.column(align=True)
col.itemL(text="Size:")
col.itemR(metaelem, "size_x", text="X")
elif metaelem.type == 'PLANE':
-
col = split.column(align=True)
col.itemL(text="Size:")
col.itemR(metaelem, "size_x", text="X")
col.itemR(metaelem, "size_y", text="Y")
elif metaelem.type == 'ELLIPSOID':
-
col = split.column(align=True)
col.itemL(text="Size:")
col.itemR(metaelem, "size_x", text="X")
col.itemR(metaelem, "size_y", text="Y")
col.itemR(metaelem, "size_z", text="Z")
-
bpy.types.register(DATA_PT_context_metaball)
bpy.types.register(DATA_PT_metaball)
diff --git a/release/ui/buttons_data_text.py b/release/ui/buttons_data_text.py
index 2959f60a5f5..0d46d5f8a0d 100644
--- a/release/ui/buttons_data_text.py
+++ b/release/ui/buttons_data_text.py
@@ -125,7 +125,6 @@ class DATA_PT_font(DataButtonsPanel):
col.itemL(text="Underline:")
col.itemR(text, "ul_position", text="Position")
col.itemR(text, "ul_height", text="Thickness")
-
class DATA_PT_paragraph(DataButtonsPanel):
__label__ = "Paragraph"
@@ -151,7 +150,6 @@ class DATA_PT_paragraph(DataButtonsPanel):
col.itemR(text, "offset_x", text="X")
col.itemR(text, "offset_y", text="Y")
-
class DATA_PT_textboxes(DataButtonsPanel):
__label__ = "Text Boxes"
diff --git a/release/ui/buttons_game.py b/release/ui/buttons_game.py
index f3461d3e370..5f5d4f916d0 100644
--- a/release/ui/buttons_game.py
+++ b/release/ui/buttons_game.py
@@ -26,7 +26,6 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
#if game.physics_type == 'DYNAMIC':
if game.physics_type in ('DYNAMIC', 'RIGID_BODY'):
-
split = layout.split()
col = split.column()
@@ -88,7 +87,6 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
col.itemR(game, "lock_z_rot_axis", text="Z")
elif game.physics_type == 'SOFT_BODY':
-
col = layout.column()
col.itemR(game, "actor")
col.itemR(game, "ghost")
@@ -124,14 +122,12 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
sub.itemR(soft, "cluster_iterations", text="Iterations")
elif game.physics_type == 'STATIC':
-
col = layout.column()
col.itemR(game, "actor")
col.itemR(game, "ghost")
col.itemR(ob, "restrict_render", text="Invisible")
elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
-
layout.itemR(ob, "restrict_render", text="Invisible")
class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py
index 8b58c2b8953..448cb36e130 100644
--- a/release/ui/buttons_material.py
+++ b/release/ui/buttons_material.py
@@ -356,8 +356,8 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
def draw_header(self, context):
- sss = context.material.subsurface_scattering
mat = context.material
+ sss = mat.subsurface_scattering
self.layout.active = (not mat.shadeless)
self.layout.itemR(sss, "enabled", text="")
@@ -366,7 +366,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
layout = self.layout
mat = context.material
- sss = context.material.subsurface_scattering
+ sss = mat.subsurface_scattering
layout.active = sss.enabled
@@ -409,7 +409,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
layout = self.layout
mat = context.material
- raym = context.material.raytrace_mirror
+ raym = mat.raytrace_mirror
layout.active = raym.enabled
@@ -457,13 +457,14 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
def draw_header(self, context):
mat = context.material
+
self.layout.itemR(mat, "transparency", text="")
def draw(self, context):
layout = self.layout
mat = context.material
- rayt = context.material.raytrace_transparency
+ rayt = mat.raytrace_transparency
row = layout.row()
row.active = mat.transparency and (not mat.shadeless)
@@ -561,11 +562,9 @@ class MATERIAL_PT_flare(MaterialButtonsPanel):
return mat and (mat.type == 'HALO') and (engine in self.COMPAT_ENGINES)
def draw_header(self, context):
- layout = self.layout
-
- mat = context.material
- halo = mat.halo
- layout.itemR(halo, "flare_mode", text="")
+ halo = context.material.halo
+
+ self.layout.itemR(halo, "flare_mode", text="")
def draw(self, context):
layout = self.layout
@@ -619,7 +618,6 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
def draw(self, context):
layout = self.layout
- mat = context.material
vol = context.material.volume
row = layout.row()
@@ -658,10 +656,10 @@ class MATERIAL_PT_volume_scattering(VolumeButtonsPanel):
elif vol.scattering_mode in ('MULTIPLE_SCATTERING', 'SINGLE_PLUS_MULTIPLE_SCATTERING'):
col.itemR(vol, "cache_resolution")
- col = col.column(align=True)
- col.itemR(vol, "ms_diffusion")
- col.itemR(vol, "ms_spread")
- col.itemR(vol, "ms_intensity")
+ sub = col.column(align=True)
+ sub.itemR(vol, "ms_diffusion")
+ sub.itemR(vol, "ms_spread")
+ sub.itemR(vol, "ms_intensity")
col = split.column()
# col.itemL(text="Anisotropic Scattering:")
@@ -677,11 +675,8 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
layout = self.layout
mat = context.material
- rayt = context.material.raytrace_transparency
- row= layout.row()
- row.itemR(mat, "transparency_method", expand=True)
- row.active = mat.transparency and (not mat.shadeless)
+ layout.itemR(mat, "transparency_method", expand=True)
class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
__label__ = "Integration"
@@ -690,8 +685,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
def draw(self, context):
layout = self.layout
-
- mat = context.material
+
vol = context.material.volume
split = layout.split()
@@ -699,9 +693,9 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
col = split.column()
col.itemL(text="Step Calculation:")
col.itemR(vol, "step_calculation", text="")
- col = col.column(align=True)
- col.itemR(vol, "step_size")
- col.itemR(vol, "shading_step_size")
+ sub = col.column(align=True)
+ sub.itemR(vol, "step_size")
+ sub.itemR(vol, "shading_step_size")
col = split.column()
col.itemL()
diff --git a/release/ui/buttons_object_constraint.py b/release/ui/buttons_object_constraint.py
index ca5c86fddd7..e089cff264f 100644
--- a/release/ui/buttons_object_constraint.py
+++ b/release/ui/buttons_object_constraint.py
@@ -68,8 +68,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
col = split.column()
col.itemR(con, "iterations")
col.itemR(con, "chain_length")
-
-
+
def CHILD_OF(self, context, layout, con):
self.target_template(layout, con)
diff --git a/release/ui/buttons_physics_cloth.py b/release/ui/buttons_physics_cloth.py
index 5cdca3c2c74..f6493951a34 100644
--- a/release/ui/buttons_physics_cloth.py
+++ b/release/ui/buttons_physics_cloth.py
@@ -89,7 +89,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
__default_closed__ = True
def poll(self, context):
- return (context.cloth)
+ return context.cloth
def draw(self, context):
md = context.cloth
@@ -100,7 +100,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
__default_closed__ = True
def poll(self, context):
- return (context.cloth)
+ return context.cloth
def draw_header(self, context):
cloth = context.cloth.collision_settings
@@ -135,7 +135,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
__default_closed__ = True
def poll(self, context):
- return (context.cloth != None)
+ return context.cloth
def draw_header(self, context):
cloth = context.cloth.settings
diff --git a/release/ui/buttons_physics_field.py b/release/ui/buttons_physics_field.py
index f6b50844fc8..7d14690856a 100644
--- a/release/ui/buttons_physics_field.py
+++ b/release/ui/buttons_physics_field.py
@@ -103,7 +103,6 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
sub.itemR(field, "maximum_distance", text="Distance")
if field.falloff_type == 'CONE':
-
layout.itemS()
split = layout.split(percentage=0.35)
@@ -125,7 +124,6 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
sub.itemR(field, "radial_maximum", text="Angle")
elif field.falloff_type == 'TUBE':
-
layout.itemS()
split = layout.split(percentage=0.35)
diff --git a/release/ui/buttons_physics_fluid.py b/release/ui/buttons_physics_fluid.py
index 6f7a97ff793..e178a831ddd 100644
--- a/release/ui/buttons_physics_fluid.py
+++ b/release/ui/buttons_physics_fluid.py
@@ -174,8 +174,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
def poll(self, context):
md = context.fluid
- if md:
- return (md.settings.type == 'DOMAIN')
+ return md and (md.settings.type == 'DOMAIN')
def draw(self, context):
layout = self.layout
@@ -213,8 +212,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
def poll(self, context):
md = context.fluid
- if md:
- return (md.settings.type == 'DOMAIN')
+ return md and (md.settings.type == 'DOMAIN')
def draw(self, context):
layout = self.layout
@@ -242,8 +240,7 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
def poll(self, context):
md = context.fluid
- if md:
- return (md.settings.type == 'DOMAIN')
+ return md and (md.settings.type == 'DOMAIN')
def draw(self, context):
layout = self.layout
diff --git a/release/ui/buttons_physics_smoke.py b/release/ui/buttons_physics_smoke.py
index 6aee152e92a..1541b0bae14 100644
--- a/release/ui/buttons_physics_smoke.py
+++ b/release/ui/buttons_physics_smoke.py
@@ -90,10 +90,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
def poll(self, context):
md = context.smoke
- if md:
- return (md.smoke_type == 'TYPE_DOMAIN')
-
- return False
+ return md and (md.smoke_type == 'TYPE_DOMAIN')
def draw(self, context):
layout = self.layout
diff --git a/release/ui/buttons_physics_softbody.py b/release/ui/buttons_physics_softbody.py
index 703977a056f..3bdbb1b8b90 100644
--- a/release/ui/buttons_physics_softbody.py
+++ b/release/ui/buttons_physics_softbody.py
@@ -63,7 +63,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
__default_closed__ = True
def poll(self, context):
- return (context.soft_body)
+ return context.soft_body
def draw(self, context):
md = context.soft_body
@@ -74,7 +74,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
__default_closed__ = True
def poll(self, context):
- return (context.soft_body)
+ return context.soft_body
def draw_header(self, context):
softbody = context.soft_body.settings
@@ -115,7 +115,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
__default_closed__ = True
def poll(self, context):
- return (context.soft_body)
+ return context.soft_body
def draw_header(self, context):
softbody = context.soft_body.settings
@@ -163,7 +163,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
__default_closed__ = True
def poll(self, context):
- return (context.soft_body)
+ return context.soft_body
def draw_header(self, context):
softbody = context.soft_body.settings
@@ -194,7 +194,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
__default_closed__ = True
def poll(self, context):
- return (context.soft_body)
+ return context.soft_body
def draw(self, context):
layout = self.layout
diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py
index 6f283bb5d5b..8bb172e8cd1 100644
--- a/release/ui/buttons_scene.py
+++ b/release/ui/buttons_scene.py
@@ -452,7 +452,6 @@ class SCENE_PT_unit(RenderButtonsPanel):
row.itemR(unit, "scale_length", text="Scale")
row.itemR(unit, "use_separate")
-
bpy.types.register(SCENE_PT_render)
bpy.types.register(SCENE_PT_layers)
bpy.types.register(SCENE_PT_dimensions)
diff --git a/release/ui/buttons_texture.py b/release/ui/buttons_texture.py
index c595e2b1cc2..c95fa266aaa 100644
--- a/release/ui/buttons_texture.py
+++ b/release/ui/buttons_texture.py
@@ -253,7 +253,6 @@ class TEXTURE_PT_influence(TextureSlotPanel):
col.itemL(text=" ")
factor_but(col, tex.map_alpha, "map_coloremission", "coloremission_factor", "Emission Color")
factor_but(col, tex.map_colorabsorption, "map_colorabsorption", "colorabsorption_factor", "Absorption Color")
-
elif la:
row = layout.row()
@@ -617,9 +616,8 @@ class TEXTURE_PT_distortednoise(TextureTypePanel):
flow.itemR(tex, "nabla")
class TEXTURE_PT_voxeldata(TextureButtonsPanel):
- __idname__= "TEXTURE_PT_voxeldata"
__label__ = "Voxel Data"
-
+
def poll(self, context):
tex = context.texture
return (tex and tex.type == 'VOXEL_DATA')
@@ -647,9 +645,8 @@ class TEXTURE_PT_voxeldata(TextureButtonsPanel):
layout.itemR(vd, "intensity")
class TEXTURE_PT_pointdensity(TextureButtonsPanel):
- __idname__= "TEXTURE_PT_pointdensity"
__label__ = "Point Density"
-
+
def poll(self, context):
tex = context.texture
return (tex and tex.type == 'POINT_DENSITY')
diff --git a/release/ui/buttons_world.py b/release/ui/buttons_world.py
index b02673d126f..3134c0ce46b 100644
--- a/release/ui/buttons_world.py
+++ b/release/ui/buttons_world.py
@@ -169,10 +169,9 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
col.itemR(ao, "energy")
col = split.column()
- colsub = col.split(percentage=0.3)
- colsub.itemL(text="Color:")
- colsub.itemR(ao, "color", text="")
-
+ sub = col.split(percentage=0.3)
+ sub.itemL(text="Color:")
+ sub.itemR(ao, "color", text="")
bpy.types.register(WORLD_PT_context_world)
bpy.types.register(WORLD_PT_preview)
diff --git a/release/ui/space_sequencer.py b/release/ui/space_sequencer.py
index daae4a83ec4..a804998cdaa 100644
--- a/release/ui/space_sequencer.py
+++ b/release/ui/space_sequencer.py
@@ -555,11 +555,9 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel):
return strip.type in ('MOVIE', 'IMAGE', 'SCENE', 'META')
def draw_header(self, context):
- layout = self.layout
-
strip = act_strip(context)
- layout.itemR(strip, "use_proxy", text="")
+ self.layout.itemR(strip, "use_proxy", text="")
def draw(self, context):
layout = self.layout
diff --git a/release/ui/space_view3d_toolbar.py b/release/ui/space_view3d_toolbar.py
index 239a727d2a2..4c1b54ea8e6 100644
--- a/release/ui/space_view3d_toolbar.py
+++ b/release/ui/space_view3d_toolbar.py
@@ -173,9 +173,7 @@ class VIEW3D_PT_tools_textedit(View3DPanel):
def draw(self, context):
layout = self.layout
-
-
-
+
col = layout.column(align=True)
col.itemL(text="Text Edit:")
col.itemO("font.text_copy", text="Copy")
@@ -201,9 +199,7 @@ class VIEW3D_PT_tools_armatureedit(View3DPanel):
def draw(self, context):
layout = self.layout
-
-
-
+
col = layout.column(align=True)
col.itemL(text="Transform:")
col.itemO("tfm.translate")
@@ -366,7 +362,6 @@ class VIEW3D_PT_tools_brush(PaintPanel):
col.itemR(brush, "strength", slider=True)
if settings.tool == 'ADD':
-
col = layout.column()
col.itemR(settings, "add_interpolate")
sub = col.column(align=True)
@@ -409,8 +404,6 @@ class VIEW3D_PT_tools_brush(PaintPanel):
col.itemR(brush, "persistent")
col.itemO("sculpt.set_persistent_base")
-
-
# Texture Paint Mode #
elif context.texture_paint_object and brush:
@@ -625,10 +618,10 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel):
def poll(self, context):
return context.tool_settings.image_paint.tool != 'SMEAR'
- def draw_header(self, context):
- layout = self.layout
- ipaint = context.tool_settings.image_paint
- layout.itemR(ipaint, "use_projection", text="")
+ def draw_header(self, context):
+ ipaint = context.tool_settings.image_paint
+
+ self.layout.itemR(ipaint, "use_projection", text="")
def draw(self, context):
layout = self.layout