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 23 additions and 32 deletions
Showing only changes of commit 84d81f8bea - Show all commits

View File

@ -185,3 +185,8 @@ def transfer_info_clean(obj, list):
for item in list:
if not asset_suffix.get_basename(item.name) in transfer_data.keys():
list.remove(item)
def transfer_info_is_missing(transfer_info, type_key, list):
if transfer_info.type == type_key and not list.get(transfer_info["name"]):
return True

View File

@ -13,11 +13,9 @@ def vertex_groups_clean(obj):
def vertex_group_is_missing(transfer_info):
obj = transfer_info.id_data
if transfer_info.type == constants.VERTEX_GROUP_KEY and not obj.vertex_groups.get(
transfer_info["name"]
):
return True
return transfer_core.transfer_info_is_missing(
transfer_info, constants.VERTEX_GROUP_KEY, transfer_info.id_data.vertex_groups
)
def init_vertex_groups(scene, obj):
@ -74,12 +72,9 @@ def vertex_colors_clean(obj):
def vertex_color_is_missing(transfer_info):
obj = transfer_info.id_data
if (
transfer_info.type == constants.VERTEX_COLOR_KEY
and not obj.data.vertex_colors.get(transfer_info["name"])
):
return True
return transfer_core.transfer_info_is_missing(
transfer_info, constants.VERTEX_COLOR_KEY, transfer_info.id_data.vertex_colors
)
def init_vertex_colors(scene, obj):
@ -132,11 +127,9 @@ def uv_layer_clean(obj):
def uv_layer_is_missing(transfer_info):
obj = transfer_info.id_data
if transfer_info.type == constants.UV_LAYERS_KEY and not obj.data.uv_layers.get(
transfer_info["name"]
):
return True
return transfer_core.transfer_info_is_missing(
transfer_info, constants.UV_LAYERS_KEY, transfer_info.id_data.data.uv_layers
)
def init_uv_layers(scene, obj):
@ -187,11 +180,9 @@ def modifiers_clean(obj):
def modifier_is_missing(transfer_info):
obj = transfer_info.id_data
if transfer_info.type == constants.MODIFIER_KEY and not obj.modifiers.get(
transfer_info["name"]
):
return True
return transfer_core.transfer_info_is_missing(
transfer_info, constants.MODIFIER_KEY, transfer_info.id_data.modifiers
)
def init_modifiers(scene, obj):
@ -271,11 +262,9 @@ def constraints_clean(obj):
def constraint_is_missing(transfer_info):
obj = transfer_info.id_data
if transfer_info.type == constants.CONSTRAINT_KEY and not obj.constraints.get(
transfer_info["name"]
):
return True
return transfer_core.transfer_info_is_missing(
transfer_info, constants.CONSTRAINT_KEY, transfer_info.id_data.constraints
)
def init_constraints(scene, obj):
@ -339,12 +328,9 @@ def material_slot_clean(obj):
def material_slot_is_missing(transfer_info):
obj = transfer_info.id_data
if (
transfer_info.type == constants.MATERIAL_SLOT_KEY
and not obj.material_slots.get(transfer_info["name"])
):
return True
return transfer_core.transfer_info_is_missing(
transfer_info, constants.MATERIAL_SLOT_KEY, transfer_info.id_data.material_slots
)
def init_material_slots(scene, obj):