Asset Pipeline: Store Asset Catalog in String #230
@ -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):
|
def get_task_layer_presets(self, context):
|
||||||
prefs = get_addon_prefs()
|
prefs = get_addon_prefs()
|
||||||
user_tls = Path(prefs.custom_task_layers_dir)
|
user_tls = Path(prefs.custom_task_layers_dir)
|
||||||
@ -170,7 +178,7 @@ class AssetPipeline(bpy.types.PropertyGroup):
|
|||||||
if asset_name is None:
|
if asset_name is None:
|
||||||
return ""
|
return ""
|
||||||
return asset_name
|
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):
|
def get_asset_catalogs_search(self, context, edit_text: str):
|
||||||
return get_asset_catalog_items()
|
return get_asset_catalog_items()
|
||||||
|
Loading…
Reference in New Issue
Block a user