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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-03-19 04:47:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-03-19 04:50:23 +0300
commit8c378c52c83757b9e78d5a98581bf240ed31a1ec (patch)
tree4a44a8e7fab77f9f812a8940713f14dceeec512c /io_convert_image_to_mesh_img
parent57f376e9465c6b79ebd4409bc30e0b5930dd4140 (diff)
Cleanup: identity for None comparison
Diffstat (limited to 'io_convert_image_to_mesh_img')
-rw-r--r--io_convert_image_to_mesh_img/import_img.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/io_convert_image_to_mesh_img/import_img.py b/io_convert_image_to_mesh_img/import_img.py
index 303991dc..7c9e76d1 100644
--- a/io_convert_image_to_mesh_img/import_img.py
+++ b/io_convert_image_to_mesh_img/import_img.py
@@ -67,7 +67,7 @@ class hirise_dtm_importer(object):
self.__cropXY = False
def bin_mode(self, bin_mode=None):
- if bin_mode != None:
+ if bin_mode is not None:
self.__bin_mode = bin_mode
return self.__bin_mode
@@ -503,7 +503,7 @@ class hirise_dtm_importer(object):
x = 0
point_offset += len( last_line ) - last_line.count(None)
for z in last_line:
- if z != None:
+ if z is not None:
coords.append( (x*scale_x, 0.0, z) )
coord += 1
x += 1
@@ -535,7 +535,7 @@ class hirise_dtm_importer(object):
# TODO: turn this into a map
x = 0
for z in dtm_line:
- if z != None:
+ if z is not None:
coords.append( (x*scale_x, y_val, z) )
coord += 1
x += 1
@@ -567,17 +567,17 @@ class hirise_dtm_importer(object):
# TODO: implement a triangular face
pass
- if vals[1] != None:
+ if vals[1] is not None:
previous_point_offset += 1
- if vals[2] != None:
+ if vals[2] is not None:
point_offset += 1
# Squeeze the last point offset increment out of the previous line
- if last_line[-1] != None:
+ if last_line[-1] is not None:
previous_point_offset += 1
# Squeeze the last point out of the current line
- if dtm_line[-1] != None:
+ if dtm_line[-1] is not None:
point_offset += 1
# remember what we just saw (and forget anything before that)