Asset Pipeline v2 #145
@ -381,6 +381,10 @@ def shape_keys_clean(obj):
|
|||||||
if not asset_suffix.get_basename(shape_key.name) in transfer_data.keys():
|
if not asset_suffix.get_basename(shape_key.name) in transfer_data.keys():
|
||||||
obj.shape_key_remove(shape_key)
|
obj.shape_key_remove(shape_key)
|
||||||
|
|
||||||
|
# Move Shape Keys relative to themselves to the top (usually basis key)
|
||||||
|
if shape_key.relative_key == shape_key:
|
||||||
|
shape_key_move(bpy.context, obj, shape_key.name)
|
||||||
|
|
||||||
|
|
||||||
def shape_key_is_missing(transfer_info):
|
def shape_key_is_missing(transfer_info):
|
||||||
return transfer_core.transfer_info_is_missing(
|
return transfer_core.transfer_info_is_missing(
|
||||||
@ -408,8 +412,6 @@ def transfer_shape_key(
|
|||||||
sk_source = source_obj.data.shape_keys.key_blocks.get(shape_key_name)
|
sk_source = source_obj.data.shape_keys.key_blocks.get(shape_key_name)
|
||||||
print(f"Moving shape key: {shape_key_name}")
|
print(f"Moving shape key: {shape_key_name}")
|
||||||
|
|
||||||
# TODO Restore Shape Key Index Position after Transfer
|
|
||||||
|
|
||||||
# If key is relative to another key that doesn't exist yet
|
# If key is relative to another key that doesn't exist yet
|
||||||
if sk_source.relative_key != sk_source:
|
if sk_source.relative_key != sk_source:
|
||||||
relative_key = target_obj.data.shape_keys.key_blocks.get(
|
relative_key = target_obj.data.shape_keys.key_blocks.get(
|
||||||
@ -433,9 +435,6 @@ def transfer_shape_key(
|
|||||||
sk_target.relative_key = target_obj.data.shape_keys.key_blocks[
|
sk_target.relative_key = target_obj.data.shape_keys.key_blocks[
|
||||||
sk_source.relative_key.name
|
sk_source.relative_key.name
|
||||||
]
|
]
|
||||||
# TODO DEBUG COTNEXT OVERRIDE ISSUE HERE TO RE-ORDER ITEMS
|
|
||||||
# TODO Only move relative keys to the top
|
|
||||||
shape_key_active_move(context, target_obj, shape_key_name)
|
|
||||||
|
|
||||||
bm_source = bmesh.new()
|
bm_source = bmesh.new()
|
||||||
bm_source.from_mesh(source_obj.data)
|
bm_source.from_mesh(source_obj.data)
|
||||||
|
Loading…
Reference in New Issue
Block a user