From 680dc23d9766a0a55a851bec21c7142b9c174f67 Mon Sep 17 00:00:00 2001 From: Triangle717 Date: Thu, 1 May 2014 20:33:23 -0400 Subject: [PATCH] Let another whack at restoring import speed [ci skip] --- import_ldraw.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/import_ldraw.py b/import_ldraw.py index ab00c65..6516f2e 100644 --- a/import_ldraw.py +++ b/import_ldraw.py @@ -795,8 +795,8 @@ def create_model(self, scale, context): for cur_obj in objects: cur_obj.select = True bpy.context.scene.objects.active = cur_obj - if bpy.ops.object.mode_set.poll(): + if bpy.ops.object.mode_set.poll(): # Change to edit mode bpy.ops.object.mode_set(mode='EDIT') bpy.ops.mesh.select_all(action='SELECT') @@ -804,8 +804,8 @@ def create_model(self, scale, context): # Remove doubles, calculate normals bpy.ops.mesh.remove_doubles(threshold=0.01) bpy.ops.mesh.normals_make_consistent() - if bpy.ops.object.mode_set.poll(): + if bpy.ops.object.mode_set.poll(): # Go back to object mode, set origin to geometry bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY') @@ -813,7 +813,8 @@ def create_model(self, scale, context): # Set smooth shading bpy.ops.object.shade_smooth() - # Add 30 degree edge split modifier to all bricks + # Add 30 degree edge split modifier to all bricks + for cur_obj in objects: edges = cur_obj.modifiers.new( "Edge Split", type='EDGE_SPLIT') edges.split_angle = 0.523599