continue refacto
parent
575bbade7b
commit
74724423b4
|
@ -7,7 +7,8 @@ from asset_library.action import (
|
||||||
operators,
|
operators,
|
||||||
properties,
|
properties,
|
||||||
rename_pose,
|
rename_pose,
|
||||||
render_preview,)
|
#render_preview
|
||||||
|
)
|
||||||
|
|
||||||
if 'bpy' in locals():
|
if 'bpy' in locals():
|
||||||
import importlib
|
import importlib
|
||||||
|
@ -19,7 +20,7 @@ if 'bpy' in locals():
|
||||||
importlib.reload(operators)
|
importlib.reload(operators)
|
||||||
importlib.reload(properties)
|
importlib.reload(properties)
|
||||||
importlib.reload(rename_pose)
|
importlib.reload(rename_pose)
|
||||||
importlib.reload(render_preview)
|
#importlib.reload(render_preview)
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
operators.register()
|
operators.register()
|
||||||
|
|
|
@ -73,8 +73,8 @@ from asset_library.action.functions import (
|
||||||
from asset_library.common.functions import (
|
from asset_library.common.functions import (
|
||||||
#get_actionlib_dir,
|
#get_actionlib_dir,
|
||||||
get_asset_source,
|
get_asset_source,
|
||||||
get_catalog_path,
|
#get_catalog_path,
|
||||||
read_catalog,
|
#read_catalog,
|
||||||
#set_actionlib_dir,
|
#set_actionlib_dir,
|
||||||
resync_lib,
|
resync_lib,
|
||||||
get_active_library,
|
get_active_library,
|
||||||
|
@ -299,7 +299,7 @@ class ACTIONLIB_OT_apply_anim(Operator):
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
class ACTIONLIB_OT_publish(Operator):
|
class ACTIONLIB_OT_publish(Operator):
|
||||||
bl_idname = "actionlib.publish"
|
bl_idname = "actionlib.publish"
|
||||||
bl_label = "Publish Library"
|
bl_label = "Publish Library"
|
||||||
|
@ -444,6 +444,7 @@ class ACTIONLIB_OT_publish(Operator):
|
||||||
|
|
||||||
print('[>-] Publish Done.')
|
print('[>-] Publish Done.')
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class ACTIONLIB_OT_create_anim_asset(Operator):
|
class ACTIONLIB_OT_create_anim_asset(Operator):
|
||||||
|
@ -1059,7 +1060,7 @@ class ACTIONLIB_OT_store_anim_pose(Operator):
|
||||||
classes = (
|
classes = (
|
||||||
ACTIONLIB_OT_assign_action,
|
ACTIONLIB_OT_assign_action,
|
||||||
ACTIONLIB_OT_restore_previous_action,
|
ACTIONLIB_OT_restore_previous_action,
|
||||||
ACTIONLIB_OT_publish,
|
#ACTIONLIB_OT_publish,
|
||||||
ACTIONLIB_OT_apply_anim,
|
ACTIONLIB_OT_apply_anim,
|
||||||
ACTIONLIB_OT_replace_pose,
|
ACTIONLIB_OT_replace_pose,
|
||||||
ACTIONLIB_OT_create_anim_asset,
|
ACTIONLIB_OT_create_anim_asset,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
from asset_library.common.functions import (read_catalog, write_catalog, norm_asset_datas)
|
from asset_library.common.functions import (norm_asset_datas,)
|
||||||
from asset_library.common.bl_utils import get_addon_prefs, load_datablocks
|
from asset_library.common.bl_utils import get_addon_prefs, load_datablocks
|
||||||
from asset_library.common.file_utils import read_file, write_file
|
from asset_library.common.file_utils import read_file, write_file
|
||||||
from asset_library.common.template import Template
|
from asset_library.common.template import Template
|
||||||
|
@ -317,6 +317,9 @@ class AssetLibraryAdapter(PropertyGroup):
|
||||||
"""Read the catalog file of the library target directory or of the specified directory"""
|
"""Read the catalog file of the library target directory or of the specified directory"""
|
||||||
catalog_path = self.get_catalog_path(directory)
|
catalog_path = self.get_catalog_path(directory)
|
||||||
|
|
||||||
|
if not catalog_path.exists():
|
||||||
|
return {}
|
||||||
|
|
||||||
cat_data = {}
|
cat_data = {}
|
||||||
|
|
||||||
for line in catalog_path.read_text(encoding="utf-8").split('\n'):
|
for line in catalog_path.read_text(encoding="utf-8").split('\n'):
|
||||||
|
@ -761,12 +764,12 @@ class AssetLibraryAdapter(PropertyGroup):
|
||||||
|
|
||||||
print(f'Saving Blend to {blend_path}')
|
print(f'Saving Blend to {blend_path}')
|
||||||
|
|
||||||
#blend_path.parent.mkdir(exist_ok=True, parents=True)
|
blend_path.parent.mkdir(exist_ok=True, parents=True)
|
||||||
|
|
||||||
#bpy.ops.wm.save_as_mainfile(filepath=str(blend_path), compress=True)
|
bpy.ops.wm.save_as_mainfile(filepath=str(blend_path), compress=True)
|
||||||
|
|
||||||
#if write_cache:
|
if write_cache:
|
||||||
# self.write_cache(cache)
|
self.write_cache(cache)
|
||||||
|
|
||||||
self.write_catalog(catalog_data)
|
self.write_catalog(catalog_data)
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,9 @@ from asset_library.collection import (
|
||||||
gui,
|
gui,
|
||||||
operators,
|
operators,
|
||||||
keymaps,
|
keymaps,
|
||||||
build_collection_blends,
|
#build_collection_blends,
|
||||||
create_collection_library)
|
#create_collection_library,
|
||||||
|
)
|
||||||
|
|
||||||
if 'bpy' in locals():
|
if 'bpy' in locals():
|
||||||
import importlib
|
import importlib
|
||||||
|
@ -12,8 +13,8 @@ if 'bpy' in locals():
|
||||||
importlib.reload(gui)
|
importlib.reload(gui)
|
||||||
importlib.reload(operators)
|
importlib.reload(operators)
|
||||||
importlib.reload(keymaps)
|
importlib.reload(keymaps)
|
||||||
importlib.reload(build_collection_blends)
|
#importlib.reload(build_collection_blends)
|
||||||
importlib.reload(create_collection_library)
|
#importlib.reload(create_collection_library)
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
|
Loading…
Reference in New Issue