diff options
author | haikalle <haikalle@gmail.com> | 2019-06-02 07:46:56 +0300 |
---|---|---|
committer | haikalle <haikalle@gmail.com> | 2019-06-02 07:46:56 +0300 |
commit | f00475220fa7bf75ff4cdf4086111195d61b0363 (patch) | |
tree | 03124e687dbee504703fe33c5652ee663a4bcce0 /io_coat3D | |
parent | 080d204770a1cc1a104b25235eb636cf923037f7 (diff) |
fixes scaling issue
Diffstat (limited to 'io_coat3D')
-rw-r--r-- | io_coat3D/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py index b575ba94..64a97f4f 100644 --- a/io_coat3D/__init__.py +++ b/io_coat3D/__init__.py @@ -1050,6 +1050,7 @@ class SCENE_OT_import(bpy.types.Operator): 3DC -> Blender workflow ''' + bpy.ops.object.select_all(action='DESELECT') for old_obj in bpy.context.collection.objects: old_obj.coat3D.applink_old = True @@ -1093,7 +1094,7 @@ class SCENE_OT_import(bpy.types.Operator): old_materials = bpy.data.materials.keys() old_objects = bpy.data.objects.keys() - bpy.ops.import_scene.fbx(filepath=new_applink_address, global_scale = 1, use_manual_orientation=True, axis_forward='-Z', axis_up='Y', use_custom_normals=False) + bpy.ops.import_scene.fbx(filepath=new_applink_address, global_scale = 1, axis_forward='-Z', axis_up='Y') new_materials = bpy.data.materials.keys() new_objects = bpy.data.objects.keys() @@ -1111,12 +1112,12 @@ class SCENE_OT_import(bpy.types.Operator): bpy.data.objects[c_index].data.coat3D.name = '3DC' laskuri += 1 + bpy.ops.object.transforms_to_deltas(mode='SCALE') bpy.ops.object.select_all(action='DESELECT') for new_obj in bpy.context.collection.objects: if(new_obj.coat3D.applink_old == False): new_obj.select_set(True) - new_obj.scale = (1, 1, 1) new_obj.coat3D.applink_firsttime = False new_obj.select_set(False) new_obj.coat3D.type = 'ppp' |