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.
5 changed files with 14 additions and 5 deletions
Showing only changes of commit b57f486e60 - Show all commits

View File

@ -1,7 +1,7 @@
import bpy import bpy
from typing import Dict, Set from typing import Dict, Set
from . import core # TODO DEBUG WHY THIS DOESN'T WORK from . import core # TODO DEBUG WHY THIS DOESN'T WORK
from .asset_suffix import get_target_name, get_basename, get_name_with_asset_prefix from .asset_naming import get_target_name, get_basename, get_name_with_asset_prefix
from .util import get_storage_of_id from .util import get_storage_of_id
from .transfer_data.transfer_core import transfer_data_add_entry from .transfer_data.transfer_core import transfer_data_add_entry
from . import constants from . import constants

View File

@ -113,3 +113,12 @@ def add_suffix_to_hierarchy(collection: bpy.types.Collection, suffix_base: str)
db.name += suffix db.name += suffix
except: except:
pass pass
def get_name_with_asset_prefix(name: str):
# TODO Docstring and return types
asset_pipe = bpy.context.scene.asset_pipeline
if name.startswith(asset_pipe.prefix + "."):
return name
prefix = asset_pipe.prefix + "." if asset_pipe.prefix != "" else ""
return prefix + name

View File

@ -8,7 +8,7 @@ from .transfer_data.transfer_core import (
transfer_data_clean, transfer_data_clean,
) )
from .asset_suffix import ( from .asset_naming import (
add_suffix_to_hierarchy, add_suffix_to_hierarchy,
remove_suffix_from_hierarchy, remove_suffix_from_hierarchy,
get_name_with_asset_prefix, get_name_with_asset_prefix,

View File

@ -1,7 +1,7 @@
import bpy import bpy
from . import transfer_functions from . import transfer_functions
from .. import constants, asset_suffix from .. import asset_naming, constants
def copy_transfer_data_ownership( def copy_transfer_data_ownership(
@ -227,7 +227,7 @@ def transfer_info_clean(obj, list, td_type):
obj.transfer_data_ownership, td_type obj.transfer_data_ownership, td_type
) )
for item in list: for item in list:
if not asset_suffix.get_basename(item.name) in transfer_data_list: if not asset_naming.get_basename(item.name) in transfer_data_list:
list.remove(item) list.remove(item)

View File

@ -1,6 +1,6 @@
import bpy import bpy
from bpy import context from bpy import context
from ..asset_suffix import get_basename from ..asset_naming import get_basename
from ..drivers import find_drivers, copy_driver from ..drivers import find_drivers, copy_driver
from . import transfer_core # TODO FIX from . import transfer_core # TODO FIX
from .. import constants from .. import constants