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.
2 changed files with 12 additions and 10 deletions
Showing only changes of commit 1273e07994 - Show all commits

View File

@ -14,10 +14,10 @@ def remove_old_ownership(obj, task_layer_name):
to_remove = [] to_remove = []
for item in ownership: for item in ownership:
if constants.TASK_LAYER_KEYS[item["owner"]] == task_layer_name: if constants.TASK_LAYER_KEYS[item["owner"]] == task_layer_name:
if not ( if (
transfer_functions.verify_vertex_group(item) transfer_functions.vertex_group_is_missing(item)
or transfer_functions.verify_modifiers(item) or transfer_functions.modifiers_is_missing(item)
or transfer_functions.verify_modifiers(item) or transfer_functions.modifiers_is_missing(item)
): ):
to_remove.append(item.name) to_remove.append(item.name)

View File

@ -8,9 +8,11 @@ from .. import asset_suffix, constants
# VERTEX GROUPS # VERTEX GROUPS
def verify_vertex_group(item): def vertex_group_is_missing(item):
obj = item.id_data obj = item.id_data
if item.type == constants.VERTEX_GROUP_KEY and obj.vertex_groups.get(item["name"]): if item.type == constants.VERTEX_GROUP_KEY and not obj.vertex_groups.get(
item["name"]
):
return True return True
@ -61,9 +63,9 @@ def transfer_vertex_group(
# MODIFIERS # MODIFIERS
def verify_modifiers(item): def modifiers_is_missing(item):
obj = item.id_data obj = item.id_data
if item.type == constants.MODIFIER_KEY and obj.modifiers.get(item["name"]): if item.type == constants.MODIFIER_KEY and not obj.modifiers.get(item["name"]):
return True return True
@ -142,9 +144,9 @@ def transfer_modifier(item, obj_target):
# MATERIAL SLOT # MATERIAL SLOT
def verify_material_slot(item): def material_slot_is_missing(item):
obj = item.id_data obj = item.id_data
if item.type == constants.MATERIAL_SLOT_KEY and obj.material_slots.get( if item.type == constants.MATERIAL_SLOT_KEY and not obj.material_slots.get(
item["name"] item["name"]
): ):
return True return True