fixed hierarchy (root node)

This commit is contained in:
joric 2018-01-22 00:05:13 +05:00
parent 3435ed0fe0
commit ae73d8218d
2 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ class DebugMacro(bpy.types.Operator):
import_b3d.load(self, context, filepath=self.filepath)
bpy.ops.view3d.viewnumpad(type='FRONT', align_active=True)
bpy.ops.view3d.viewnumpad(type='FRONT', align_active=False)
bpy.ops.view3d.view_all(use_all_regions=True, center=True)
if bpy.context.region_data.is_perspective:

View File

@ -572,13 +572,13 @@ def import_node(node, parent):
objects.append(ob)
if parent: ob.parent = parent
ctx.scene.objects.link(ob)
root = ob
for ob in objects:
ob.rotation_mode='QUATERNION'
ob.rotation_quaternion = flip(rot)
ob.scale = flip(scale)
ob.location = flip(pos)
root = ob
break # rotate first (parent) only
return root