[Bf-extensions-cvs] [f0047522] master: fixes scaling issue

haikalle noreply at git.blender.org
Sun Jun 2 06:47:04 CEST 2019


Commit: f00475220fa7bf75ff4cdf4086111195d61b0363
Author: haikalle
Date:   Sun Jun 2 07:46:56 2019 +0300
Branches: master
https://developer.blender.org/rBAf00475220fa7bf75ff4cdf4086111195d61b0363

fixes scaling issue

===================================================================

M	io_coat3D/__init__.py

===================================================================

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'



More information about the Bf-extensions-cvs mailing list