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.
Showing only changes of commit 39af630d53 - Show all commits

View File

@ -183,3 +183,20 @@ def apply_transfer_data(context: bpy.types.Context, transfer_data_map) -> None:
transfer_data_item=transfer_data_item,
target_obj=target_obj,
)
def data_type_from_transfer_data_key(obj:bpy.types.Object, td_type:str):
""" Returns the data on an object that is referred to by the transfer data type"""
if td_type == constants.VERTEX_GROUP_KEY:
return obj.vertex_groups
if td_type == constants.MODIFIER_KEY:
return obj.modifiers
if td_type == constants.CONSTRAINT_KEY:
return obj.constraints
if td_type == constants.MATERIAL_SLOT_KEY:
return obj.material_slots
if td_type == constants.SHAPE_KEY_KEY:
return obj.data.shape_keys.key_blocks
if td_type == constants.ATTRIBUTE_KEY:
return obj.data.attributes
if td_type == constants.PARENT_KEY:
return obj.parent