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 9 additions and 25 deletions
Showing only changes of commit 494e3b600e - Show all commits

View File

@ -5,23 +5,13 @@
# You could even choose to name your task layers after artists in your team.
# {Task Layer Key: Collection/UI name}
# TODO Replace ENUM with List
TASK_LAYER_TYPES = {
"NONE": "None",
"Modeling": "Modeling",
"Rigging": "Rigging",
"Shading": "Shading",
}
# When creating a new asset, start in this task layer's file.
STARTING_FILE = 'Modeling'
# Convert it to the format that EnumProperty.items wants:
# List of 3-tuples, re-use name as description at 3rd element.
TASK_LAYER_TYPES_ENUM_ITEMS = [
(key, value, value) for key, value in TASK_LAYER_TYPES.items()
TASK_LAYER_TYPES = [
"Modeling",
"Rigging",
"Shading",
]
NONE_KEY = "NONE"
VERTEX_GROUP_KEY = "GROUP_VERTEX"
VERTEX_COLOR_KEY = "COLOR_ATTRIBUTE"

View File

@ -99,12 +99,6 @@ class AssetTransferMapping:
"""
coll_map: Dict[bpy.types.Collection, bpy.types.Collection] = {}
local_tl_names = [
get_name_with_asset_prefix(tl_ui_name)
for tl_key, tl_ui_name in constants.TASK_LAYER_TYPES.items()
if tl_key in self._local_tls
]
for local_task_layer_col in self._local_top_col.children:
if local_task_layer_col.asset_id_owner not in self._local_tls:
# Replace source object suffix with target suffix to get target object.

View File

@ -147,7 +147,7 @@ def get_name_with_task_layer_prefix(name: str, td_type_key: str) -> str:
str: Returns name with prefix
"""
prefix = get_default_task_layer(td_type_key)
for task_layer_key in constants.TASK_LAYER_TYPES.keys():
for task_layer_key in constants.TASK_LAYER_TYPES:
if name.startswith(task_layer_key + "."):
return name
return prefix + "." + name

View File

@ -50,7 +50,7 @@ class ASSETPIPE_OT_create_new_asset(bpy.types.Operator):
# Dynamically Create Task Layer Bools
all_task_layers = context.scene.asset_pipeline.all_task_layers
all_task_layers.clear()
for task_layer_key in constants.TASK_LAYER_TYPES.keys():
for task_layer_key in constants.TASK_LAYER_TYPES:
if task_layer_key == "NONE":
continue
new_task_layer = all_task_layers.add()
@ -119,7 +119,7 @@ class ASSETPIPE_OT_create_new_asset(bpy.types.Operator):
# TODO Support mulitple task layers in same file
# Create the file for each task layer.
for task_layer_key in constants.TASK_LAYER_TYPES.keys():
for task_layer_key in constants.TASK_LAYER_TYPES:
if task_layer_key == "NONE" or task_layer_key in local_tls:
continue
name = self._name + "." + task_layer_key + ".blend"

View File

@ -144,7 +144,7 @@ def sync_execute_push(self, context):
local_tls = [
task_layer
for task_layer in constants.TASK_LAYER_TYPES.keys()
for task_layer in constants.TASK_LAYER_TYPES
if task_layer not in self._task_layer_keys
]