Asset Pipeline v2 #145

Closed
Nick Alberelli wants to merge 431 commits from (deleted):feature/asset-pipeline-v2 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 6825e692dd - Show all commits

View File

@ -26,9 +26,11 @@ from .utils import get_storage_of_id
DELIMITER = "." DELIMITER = "."
def get_asset_basename(name):
return DELIMITER.join(name.split(DELIMITER)[:-1])
def remove_suffix_from_hierarchy( def remove_suffix_from_hierarchy(
collection: bpy.types.Collection, delimiter: str = DELIMITER collection: bpy.types.Collection
): ):
"""Removes the suffix after a set delimiter from all datablocks """Removes the suffix after a set delimiter from all datablocks
referenced by a collection, itself included""" referenced by a collection, itself included"""
@ -41,7 +43,7 @@ def remove_suffix_from_hierarchy(
# Don't rename linked datablocks. # Don't rename linked datablocks.
continue continue
try: try:
db.name = delimiter.join(db.name.split(delimiter)[:-1]) db.name = get_asset_basename(db.name)
except: except:
pass pass