Skip to content
Snippets Groups Projects
Commit 3eb7b318 authored by Ghost's avatar Ghost
Browse files

Fix for an introduced bug caused while fixing the double scene root

issue. also some changes to the longname custom property.
parent 319ab1cd
No related branches found
No related tags found
No related merge requests found
......@@ -706,7 +706,7 @@ class NifImport(NifCommon):
shortname = self.import_name(niBlock)
b_empty = bpy.data.objects.new(shortname, None)
# TODO: - is longname needed???
# TODO: - is longname needed??? Yes it is needed, it resets the original name on export
b_empty.niftools.longname = niBlock.name.decode()
self.context.scene.objects.link(b_empty)
......@@ -752,7 +752,7 @@ class NifImport(NifCommon):
self.context.scene.objects.link(b_obj)
# save original name as object property, for export
if b_name != niBlock.name.decode():
b_obj['Nif Name'] = niBlock.name.decode()
b_obj.niftools.longname = niBlock.name.decode()
# Mesh hidden flag
if niBlock.flags & 1 == 1:
......
......@@ -143,7 +143,7 @@ class ObjectHelper():
b_obj_ipo = b_obj.animation_data # get animation data
b_obj_children = b_obj.children
node_name = b_obj.name
elif (b_obj.name != parent_block.name.decode()):
elif (b_obj.name != parent_block.name.decode()) and (b_obj.parent != None):
# -> empty, b_mesh, or armature
b_obj_type = b_obj.type
assert(b_obj_type in ['EMPTY', 'MESH', 'ARMATURE']) # debug
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment