Asset Pipeline v2 #145
@ -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)
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user