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:
authorCampbell Barton <ideasman42@gmail.com>2011-08-22 13:01:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-22 13:01:49 +0400
commit1324173e99788a168322cd65fb6dc4a3067a3b6a (patch)
treeacc74907fa45e8d6c0ea5c6e73ce1aeb3c9d49f1 /release
parentaa7545b0ea0920c6ee403d305fc0c0a4af9138ae (diff)
pep8 edits and change '!= None' to 'is not None'
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy_extras/mesh_utils.py2
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_data_camera.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py8
-rw-r--r--release/scripts/startup/bl_ui/space_console.py2
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py2
-rw-r--r--release/scripts/startup/bl_ui/space_image.py18
-rw-r--r--release/scripts/startup/bl_ui/space_info.py8
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py2
-rw-r--r--release/scripts/templates/operator_export.py2
-rw-r--r--release/scripts/templates/operator_simple.py2
11 files changed, 26 insertions, 26 deletions
diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py
index c965169ff04..4b5e3eeb066 100644
--- a/release/scripts/modules/bpy_extras/mesh_utils.py
+++ b/release/scripts/modules/bpy_extras/mesh_utils.py
@@ -426,7 +426,7 @@ def ngon_tesselate(from_data, indices, fix_loops=True):
# See if its flipped the wrong way.
flip = None
for fi in fill:
- if flip != None:
+ if flip is not None:
break
for i, vi in enumerate(fi):
if vi == 0 and fi[i - 1] == 1:
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 78b68418322..23838588f43 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -178,7 +178,7 @@ def pointInEdges(pt, edges):
intersectCount = 0
for ed in edges:
xi, yi = lineIntersection2D(x1,y1, x2,y2, ed[0][0], ed[0][1], ed[1][0], ed[1][1])
- if xi != None: # Is there an intersection.
+ if xi is not None: # Is there an intersection.
intersectCount+=1
return intersectCount % 2
@@ -1131,7 +1131,7 @@ class SmartProject(Operator):
@classmethod
def poll(cls, context):
- return context.active_object != None
+ return context.active_object is not None
def execute(self, context):
main(context,
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index f484d7b59e1..5255af40951 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -107,7 +107,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
col = split.column()
- if cam.dof_object != None:
+ if cam.dof_object is not None:
col.enabled = False
col.prop(cam, "dof_distance", text="Distance")
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 03243d1153b..6f58f060504 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -156,7 +156,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
if part:
split = layout.split(percentage=0.65)
if part.type == 'HAIR':
- if psys != None and psys.is_edited:
+ if psys is not None and psys.is_edited:
split.operator("particle.edited_clear", text="Free Edit")
else:
row = split.row()
@@ -166,12 +166,12 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
row = split.row()
row.enabled = particle_panel_enabled(context, psys)
row.prop(part, "hair_step")
- if psys != None and psys.is_edited:
+ if psys is not None and psys.is_edited:
if psys.is_global_hair:
layout.operator("particle.connect_hair")
else:
layout.operator("particle.disconnect_hair")
- elif psys != None and part.type == 'REACTOR':
+ elif psys is not None and part.type == 'REACTOR':
split.enabled = particle_panel_enabled(context, psys)
split.prop(psys, "reactor_target_object")
split.prop(psys, "reactor_target_particle_system", text="Particle System")
@@ -654,7 +654,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
if settings is None:
return False
- if psys != None and psys.point_cache.use_external:
+ if psys is not None and psys.point_cache.use_external:
return False
return settings.physics_type == 'BOIDS' and engine in cls.COMPAT_ENGINES
diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py
index b517e0d86fb..cbbefa01a3c 100644
--- a/release/scripts/startup/bl_ui/space_console.py
+++ b/release/scripts/startup/bl_ui/space_console.py
@@ -41,7 +41,7 @@ class CONSOLE_MT_console(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator("console.clear")
layout.operator("console.copy")
layout.operator("console.paste")
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index dfbd7b3ae14..ae55e1373db 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -101,7 +101,7 @@ class DOPESHEET_HT_header(Header):
row.menu("DOPESHEET_MT_select")
row.menu("DOPESHEET_MT_marker")
- if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action != None):
+ if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action is not None):
row.menu("DOPESHEET_MT_channel")
elif st.mode == 'GPENCIL':
row.menu("DOPESHEET_MT_gpencil_channel")
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 2042fa1729d..97b5d8457e0 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -452,7 +452,7 @@ class IMAGE_PT_game_properties(Panel):
split = layout.split()
col = split.column()
-
+
col.prop(ima, "use_animation")
sub = col.column(align=True)
sub.active = ima.use_animation
@@ -507,7 +507,7 @@ class IMAGE_PT_view_waveform(Panel):
layout = self.layout
sima = context.space_data
-
+
layout.template_waveform(sima, "scopes")
row = layout.split(percentage=0.75)
row.prop(sima.scopes, "waveform_alpha")
@@ -544,9 +544,9 @@ class IMAGE_PT_sample_line(Panel):
def draw(self, context):
layout = self.layout
-
+
sima = context.space_data
-
+
layout.operator("image.sample_line")
layout.template_histogram(sima, "sample_histogram")
layout.prop(sima.sample_histogram, "mode")
@@ -564,9 +564,9 @@ class IMAGE_PT_scope_sample(Panel):
def draw(self, context):
layout = self.layout
-
+
sima = context.space_data
-
+
row = layout.row()
row.prop(sima.scopes, "use_full_resolution")
sub = row.row()
@@ -613,14 +613,14 @@ class IMAGE_PT_view_properties(Panel):
col = layout.column()
col.label("Cursor Location:")
col.row().prop(uvedit, "cursor_location", text="")
-
+
col.separator()
-
+
col.label(text="UVs:")
col.row().prop(uvedit, "edge_draw_type", expand=True)
split = layout.split()
-
+
col = split.column()
col.prop(uvedit, "show_faces")
col.prop(uvedit, "show_smooth_edges", text="Smooth")
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 38c1e24f27e..5afc5edf6eb 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -194,7 +194,7 @@ class INFO_MT_mesh_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text="Plane")
layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text="Cube")
@@ -215,7 +215,7 @@ class INFO_MT_curve_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text="Bezier")
layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text="Circle")
@@ -246,7 +246,7 @@ class INFO_MT_surface_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
@@ -262,7 +262,7 @@ class INFO_MT_armature_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA')
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 864d59f0cdb..b71593add96 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1049,7 +1049,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, Panel):
ob = context.active_object
col = layout.column()
- col.active = ob.vertex_groups.active != None
+ col.active = ob.vertex_groups.active is not None
col.operator("object.vertex_group_normalize_all", text="Normalize All")
col.operator("object.vertex_group_normalize", text="Normalize")
col.operator("object.vertex_group_invert", text="Invert")
diff --git a/release/scripts/templates/operator_export.py b/release/scripts/templates/operator_export.py
index aeda4ce36fb..b1d53e6ee0c 100644
--- a/release/scripts/templates/operator_export.py
+++ b/release/scripts/templates/operator_export.py
@@ -47,7 +47,7 @@ class ExportSomeData(bpy.types.Operator, ExportHelper):
@classmethod
def poll(cls, context):
- return context.active_object != None
+ return context.active_object is not None
def execute(self, context):
return write_some_data(context, self.filepath, self.use_setting)
diff --git a/release/scripts/templates/operator_simple.py b/release/scripts/templates/operator_simple.py
index 8348c7a95b1..05d9afc0ad1 100644
--- a/release/scripts/templates/operator_simple.py
+++ b/release/scripts/templates/operator_simple.py
@@ -13,7 +13,7 @@ class SimpleOperator(bpy.types.Operator):
@classmethod
def poll(cls, context):
- return context.active_object != None
+ return context.active_object is not None
def execute(self, context):
main(context)