Asset Pipeline v2 #145
@ -1,7 +1,7 @@
|
||||
import bpy
|
||||
from typing import Dict, Set
|
||||
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 .transfer_data.transfer_core import transfer_data_add_entry
|
||||
from . import constants
|
||||
|
@ -113,3 +113,12 @@ def add_suffix_to_hierarchy(collection: bpy.types.Collection, suffix_base: str)
|
||||
db.name += suffix
|
||||
except:
|
||||
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
|
@ -8,7 +8,7 @@ from .transfer_data.transfer_core import (
|
||||
transfer_data_clean,
|
||||
)
|
||||
|
||||
from .asset_suffix import (
|
||||
from .asset_naming import (
|
||||
add_suffix_to_hierarchy,
|
||||
remove_suffix_from_hierarchy,
|
||||
get_name_with_asset_prefix,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import bpy
|
||||
from . import transfer_functions
|
||||
|
||||
from .. import constants, asset_suffix
|
||||
from .. import asset_naming, constants
|
||||
|
||||
|
||||
def copy_transfer_data_ownership(
|
||||
@ -227,7 +227,7 @@ def transfer_info_clean(obj, list, td_type):
|
||||
obj.transfer_data_ownership, td_type
|
||||
)
|
||||
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)
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import bpy
|
||||
from bpy import context
|
||||
from ..asset_suffix import get_basename
|
||||
from ..asset_naming import get_basename
|
||||
from ..drivers import find_drivers, copy_driver
|
||||
from . import transfer_core # TODO FIX
|
||||
from .. import constants
|
||||
|
Loading…
Reference in New Issue
Block a user