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",
|
f"Only '{constants.REVIEW_PUBLISH_KEY}' Publish is supported when a version is staged",
|
||||||
)
|
)
|
||||||
return {'CANCELLED'}
|
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(
|
create_next_published_file(
|
||||||
current_file=Path(bpy.data.filepath),
|
current_file=Path(bpy.data.filepath),
|
||||||
publish_type=self.publish_types,
|
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)
|
staged_file = find_latest_publish(current_file, publish_type=constants.STAGED_PUBLISH_KEY)
|
||||||
# Delete Staged File
|
# Delete Staged File
|
||||||
staged_file.unlink()
|
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)
|
create_next_published_file(current_file=current_file, catalog_id=catalog_id)
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ class AssetPipeline(bpy.types.PropertyGroup):
|
|||||||
def get_asset_catalogs(self, context, edit_text: str):
|
def get_asset_catalogs(self, context, edit_text: str):
|
||||||
return get_asset_catalog_items()
|
return get_asset_catalog_items()
|
||||||
|
|
||||||
asset_catalog_id: bpy.props.StringProperty(
|
asset_catalog_name: bpy.props.StringProperty(
|
||||||
name="Catalog",
|
name="Catalog",
|
||||||
search=get_asset_catalogs,
|
search=get_asset_catalogs,
|
||||||
search_options={'SORT'},
|
search_options={'SORT'},
|
||||||
|
@ -155,7 +155,7 @@ def sync_execute_push(self, context):
|
|||||||
hooks_instance = Hooks()
|
hooks_instance = Hooks()
|
||||||
hooks_instance.load_hooks(context)
|
hooks_instance.load_hooks(context)
|
||||||
temp_file_path = create_temp_file_backup(self, 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__()
|
file_path = self._sync_target.__str__()
|
||||||
bpy.ops.wm.open_mainfile(filepath=file_path)
|
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:
|
def draw(self, context: bpy.types.Context) -> None:
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
cat_row = layout.row(align=True)
|
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="")
|
cat_row.operator("assetpipe.refresh_asset_cat", icon='FILE_REFRESH', text="")
|
||||||
layout.operator("assetpipe.batch_ownership_change")
|
layout.operator("assetpipe.batch_ownership_change")
|
||||||
layout.operator("assetpipe.revert_file", icon="FILE_TICK")
|
layout.operator("assetpipe.revert_file", icon="FILE_TICK")
|
||||||
|
Loading…
Reference in New Issue
Block a user