Asset Pipeline: Store Asset Catalog in String #230
@ -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 = get_asset_id(context.scene.asset_pipeline.asset_catalog_id)
|
||||
catalog_id = get_asset_id(context.scene.asset_pipeline.asset_catalog_name)
|
||||
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 = get_asset_id(context.scene.asset_pipeline.asset_catalog_id)
|
||||
catalog_id = get_asset_id(context.scene.asset_pipeline.asset_catalog_name)
|
||||
create_next_published_file(current_file=current_file, catalog_id=catalog_id)
|
||||
return {'FINISHED'}
|
||||
|
||||
|
@ -160,7 +160,7 @@ class AssetPipeline(bpy.types.PropertyGroup):
|
||||
def get_asset_catalogs(self, context, edit_text: str):
|
||||
return get_asset_catalog_items()
|
||||
|
||||
asset_catalog_id: bpy.props.StringProperty(
|
||||
asset_catalog_name: bpy.props.StringProperty(
|
||||
name="Catalog",
|
||||
search=get_asset_catalogs,
|
||||
search_options={'SORT'},
|
||||
|
@ -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 = get_asset_id(context.scene.asset_pipeline.asset_catalog_id)
|
||||
_catalog_id = get_asset_id(context.scene.asset_pipeline.asset_catalog_name)
|
||||
|
||||
file_path = self._sync_target.__str__()
|
||||
bpy.ops.wm.open_mainfile(filepath=file_path)
|
||||
|
@ -94,7 +94,7 @@ class ASSETPIPE_PT_sync_tools(bpy.types.Panel):
|
||||
def draw(self, context: bpy.types.Context) -> None:
|
||||
layout = self.layout
|
||||
cat_row = layout.row(align=True)
|
||||
cat_row.prop(context.scene.asset_pipeline, 'asset_catalog_id')
|
||||
cat_row.prop(context.scene.asset_pipeline, 'asset_catalog_name')
|
||||
cat_row.operator("assetpipe.refresh_asset_cat", icon='FILE_REFRESH', text="")
|
||||
layout.operator("assetpipe.batch_ownership_change")
|
||||
layout.operator("assetpipe.revert_file", icon="FILE_TICK")
|
||||
|
Loading…
Reference in New Issue
Block a user