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 f9d76a3aaf - Show all commits

View File

@ -13,6 +13,14 @@ avaliable task layers from the task_layer.json file that needs to be created.
"""
def get_safely_string_prop(self, name: str) -> str:
"""Return Value of String Property, and return "" if value isn't set"""
try:
return self[name]
except KeyError:
return ""
def get_task_layer_presets(self, context):
prefs = get_addon_prefs()
user_tls = Path(prefs.custom_task_layers_dir)
@ -170,7 +178,7 @@ class AssetPipeline(bpy.types.PropertyGroup):
if asset_name is None:
return ""
return asset_name
return self['asset_catalog_name']
return get_safely_string_prop(self, 'asset_catalog_name')
def get_asset_catalogs_search(self, context, edit_text: str):
return get_asset_catalog_items()