From 9cc2ad1eaf941d8ed3b5542a3d5cdfccec7ba60b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Dec 2018 11:35:45 +1100 Subject: Fix invalid string comparisons Identity checks should never be used with strings, it may fail based on Python's interning logic. --- io_import_images_as_planes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io_import_images_as_planes.py') diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py index 1f32bc5f..a4aa98f2 100644 --- a/io_import_images_as_planes.py +++ b/io_import_images_as_planes.py @@ -1094,7 +1094,7 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper): bpy.ops.mesh.primitive_plane_add('INVOKE_REGION_WIN') plane = context.scene.objects.active # Why does mesh.primitive_plane_add leave the object in edit mode??? - if plane.mode is not 'OBJECT': + if plane.mode != 'OBJECT': bpy.ops.object.mode_set(mode='OBJECT') plane.dimensions = width, height, 0.0 plane.data.name = plane.name = name -- cgit v1.2.3