mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Remove library after loading
This commit is contained in:
parent
1e3e63aaec
commit
b0f42ae6cf
1 changed files with 5 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ class BlendLoader(plugin.AssetLoader):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def _process_data(self, libpath, group_name):
|
def _process_data(self, libpath, group_name):
|
||||||
# Append all the data from the .blend file
|
# Append all the data from the .blend file
|
||||||
with bpy.data.libraries.load(
|
with bpy.data.libraries.load(
|
||||||
libpath, link=False, relative=False
|
libpath, link=False, relative=False
|
||||||
) as (data_from, data_to):
|
) as (data_from, data_to):
|
||||||
|
|
@ -89,6 +89,10 @@ class BlendLoader(plugin.AssetLoader):
|
||||||
|
|
||||||
avalon_container.objects.link(container)
|
avalon_container.objects.link(container)
|
||||||
|
|
||||||
|
# Remove the library from the blend file
|
||||||
|
library = bpy.data.libraries.get(bpy.path.basename(libpath))
|
||||||
|
bpy.data.libraries.remove(library)
|
||||||
|
|
||||||
container[AVALON_PROPERTY] = {
|
container[AVALON_PROPERTY] = {
|
||||||
"schema": "openpype:container-2.0",
|
"schema": "openpype:container-2.0",
|
||||||
"id": AVALON_CONTAINER_ID,
|
"id": AVALON_CONTAINER_ID,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue