forked from LeenkxTeam/LNXSDK
moisesjpelaez - General Fixes
This commit is contained in:
@ -1980,7 +1980,7 @@ class LeenkxExporter:
|
||||
if bobject.parent is None or bobject.parent.name not in collection.objects:
|
||||
asset_name = lnx.utils.asset_name(bobject)
|
||||
|
||||
if collection.library:
|
||||
if collection.library and not collection.name in self.scene.collection.children:
|
||||
# Add external linked objects
|
||||
# Iron differentiates objects based on their names,
|
||||
# so errors will happen if two objects with the
|
||||
@ -2399,7 +2399,7 @@ class LeenkxExporter:
|
||||
world = self.scene.world
|
||||
|
||||
if world is not None:
|
||||
world_name = lnx.utils.safestr(world.name)
|
||||
world_name = lnx.utils.safestr(lnx.utils.asset_name(world) if world.library else world.name)
|
||||
|
||||
if world_name not in self.world_array:
|
||||
self.world_array.append(world_name)
|
||||
@ -2548,12 +2548,12 @@ class LeenkxExporter:
|
||||
if collection.name.startswith(('RigidBodyWorld', 'Trait|')):
|
||||
continue
|
||||
|
||||
if self.scene.user_of_id(collection) or collection.library or collection in self.referenced_collections:
|
||||
if self.scene.user_of_id(collection) or collection in self.referenced_collections:
|
||||
self.export_collection(collection)
|
||||
|
||||
if not LeenkxExporter.option_mesh_only:
|
||||
if self.scene.camera is not None:
|
||||
self.output['camera_ref'] = self.scene.camera.name
|
||||
self.output['camera_ref'] = lnx.utils.asset_name(self.scene.camera) if self.scene.library else self.scene.camera.name
|
||||
else:
|
||||
if self.scene.name == lnx.utils.get_project_scene_name():
|
||||
log.warn(f'Scene "{self.scene.name}" is missing a camera')
|
||||
@ -2577,7 +2577,7 @@ class LeenkxExporter:
|
||||
self.export_tilesheets()
|
||||
|
||||
if self.scene.world is not None:
|
||||
self.output['world_ref'] = lnx.utils.safestr(self.scene.world.name)
|
||||
self.output['world_ref'] = lnx.utils.safestr(lnx.utils.asset_name(self.scene.world) if self.scene.world.library else self.scene.world.name)
|
||||
|
||||
if self.scene.use_gravity:
|
||||
self.output['gravity'] = [self.scene.gravity[0], self.scene.gravity[1], self.scene.gravity[2]]
|
||||
@ -3380,7 +3380,7 @@ class LeenkxExporter:
|
||||
if mobile_mat:
|
||||
lnx_radiance = False
|
||||
|
||||
out_probe = {'name': world.name}
|
||||
out_probe = {'name': lnx.utils.asset_name(world) if world.library else world.name}
|
||||
if lnx_irradiance:
|
||||
ext = '' if wrd.lnx_minimize else '.json'
|
||||
out_probe['irradiance'] = irrsharmonics + '_irradiance' + ext
|
||||
|
Reference in New Issue
Block a user