Update
This commit is contained in:
@ -19,6 +19,7 @@ import webbrowser
|
||||
import bpy
|
||||
|
||||
from lnx import assets
|
||||
from lnx.exporter import BuildExportCache
|
||||
from lnx.exporter import LeenkxExporter
|
||||
import lnx.lib.make_datas
|
||||
import lnx.lib.server
|
||||
@ -265,19 +266,21 @@ def export_data_impl(fp, sdk_path):
|
||||
continue
|
||||
for o in scene.collection.all_objects:
|
||||
if o.type in ('MESH', 'EMPTY'):
|
||||
if o.name not in export_coll_names:
|
||||
if o.name not in export_coll_names or o.library:
|
||||
export_coll.objects.link(o)
|
||||
export_coll_names.add(o.name)
|
||||
depsgraph = bpy.context.evaluated_depsgraph_get()
|
||||
bpy.data.collections.remove(export_coll) # Destroy the "zoo" collection
|
||||
|
||||
build_cache = BuildExportCache()
|
||||
|
||||
for scene in bpy.data.scenes:
|
||||
if scene.lnx_export:
|
||||
# Reset shader comparison arrays to prevent cross-scene shader merging
|
||||
assets.reset_shader_cons()
|
||||
ext = '.lz4' if LeenkxExporter.compress_enabled else '.lnx'
|
||||
asset_path = build_dir + '/compiled/Assets/' + lnx.utils.safestr(scene.name + "_" + os.path.basename(scene.library.filepath).replace(".blend", "") if scene.library else scene.name) + ext
|
||||
LeenkxExporter.export_scene(bpy.context, asset_path, scene=scene, depsgraph=depsgraph)
|
||||
LeenkxExporter.export_scene(bpy.context, asset_path, scene=scene, depsgraph=depsgraph, build_cache=build_cache)
|
||||
if LeenkxExporter.export_physics:
|
||||
physics_found = True
|
||||
if LeenkxExporter.export_navigation:
|
||||
|
||||
Reference in New Issue
Block a user