Asset Pipeline: Store Asset Catalog in String #230

Merged
Nick Alberelli merged 6 commits from TinyNick/blender-studio-pipeline:fix/asset-catalog into main 2024-02-15 22:54:08 +01:00
Showing only changes of commit bea3467e01 - Show all commits

View File

@ -5,7 +5,7 @@ from . import constants
from .config import get_task_layer_presets_path from .config import get_task_layer_presets_path
from pathlib import Path from pathlib import Path
from .prefs import get_addon_prefs from .prefs import get_addon_prefs
from .asset_catalog import get_asset_cat_enum_items from .asset_catalog import get_asset_catalog_items
""" NOTE Items in these properties groups should be generated by a function that finds the """ NOTE Items in these properties groups should be generated by a function that finds the
avaliable task layers from the task_layer.json file that needs to be created. avaliable task layers from the task_layer.json file that needs to be created.
@ -157,14 +157,15 @@ class AssetPipeline(bpy.types.PropertyGroup):
attribute_ui_bool: bpy.props.BoolProperty(name="Show/Hide Attributes", default=False) attribute_ui_bool: bpy.props.BoolProperty(name="Show/Hide Attributes", default=False)
file_parent_ui_bool: bpy.props.BoolProperty(name="Show/Hide Parent", default=False) file_parent_ui_bool: bpy.props.BoolProperty(name="Show/Hide Parent", default=False)
def get_asset_catalogs(self, context): def get_asset_catalogs(self, context, edit_text: str):
return get_asset_cat_enum_items() return get_asset_catalog_items()
asset_catalog_id: bpy.props.EnumProperty( asset_catalog_id: bpy.props.StringProperty(
name="Catalog", name="Catalog",
items=get_asset_catalogs, search=get_asset_catalogs,
search_options={'SORT'},
description="Select Asset Library Catalog for the current Asset, this value will be updated each time you Push to an 'Active' Publish", description="Select Asset Library Catalog for the current Asset, this value will be updated each time you Push to an 'Active' Publish",
) ) # type: ignore
@bpy.app.handlers.persistent @bpy.app.handlers.persistent