Asset Pipeline: Store Asset Catalog in String #230
@ -25,7 +25,7 @@ from .sync import (
|
||||
sync_execute_push,
|
||||
)
|
||||
|
||||
from .asset_catalog import get_asset_cat_enum_items
|
||||
from .asset_catalog import get_asset_catalog_items, get_asset_id
|
||||
|
||||
|
||||
class ASSETPIPE_OT_create_new_asset(bpy.types.Operator):
|
||||
@ -434,7 +434,7 @@ class ASSETPIPE_OT_publish_new_version(bpy.types.Operator):
|
||||
f"Only '{constants.REVIEW_PUBLISH_KEY}' Publish is supported when a version is staged",
|
||||
)
|
||||
return {'CANCELLED'}
|
||||
catalog_id = context.scene.asset_pipeline.asset_catalog_id
|
||||
catalog_id = get_asset_id(context.scene.asset_pipeline.asset_catalog_id)
|
||||
create_next_published_file(
|
||||
current_file=Path(bpy.data.filepath),
|
||||
publish_type=self.publish_types,
|
||||
@ -476,7 +476,7 @@ class ASSETPIPE_OT_publish_staged_as_active(bpy.types.Operator):
|
||||
staged_file = find_latest_publish(current_file, publish_type=constants.STAGED_PUBLISH_KEY)
|
||||
# Delete Staged File
|
||||
staged_file.unlink()
|
||||
catalog_id = context.scene.asset_pipeline.asset_catalog_id
|
||||
catalog_id = get_asset_id(context.scene.asset_pipeline.asset_catalog_id)
|
||||
create_next_published_file(current_file=current_file, catalog_id=catalog_id)
|
||||
return {'FINISHED'}
|
||||
|
||||
@ -960,7 +960,7 @@ class ASSETPIPE_OT_refresh_asset_cat(bpy.types.Operator):
|
||||
bl_description = """Refresh Asset Catalogs"""
|
||||
|
||||
def execute(self, context: bpy.types.Context):
|
||||
get_asset_cat_enum_items()
|
||||
get_asset_catalog_items(reload=True)
|
||||
self.report({'INFO'}, "Asset Catalogs Refreshed!")
|
||||
return {'FINISHED'}
|
||||
|
||||
|
@ -16,7 +16,7 @@ from .merge.shared_ids import get_shared_id_icon
|
||||
from . import constants, config
|
||||
from .hooks import Hooks
|
||||
from .merge.task_layer import draw_task_layer_selection
|
||||
|
||||
from .asset_catalog import get_asset_id
|
||||
|
||||
def sync_poll(cls, context):
|
||||
if any([img.is_dirty for img in bpy.data.images]):
|
||||
@ -155,7 +155,7 @@ def sync_execute_push(self, context):
|
||||
hooks_instance = Hooks()
|
||||
hooks_instance.load_hooks(context)
|
||||
temp_file_path = create_temp_file_backup(self, context)
|
||||
_catalog_id = context.scene.asset_pipeline.asset_catalog_id
|
||||
_catalog_id = get_asset_id(context.scene.asset_pipeline.asset_catalog_id)
|
||||
|
||||
file_path = self._sync_target.__str__()
|
||||
bpy.ops.wm.open_mainfile(filepath=file_path)
|
||||
|
Loading…
Reference in New Issue
Block a user