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 a572f38504 - Show all commits

View File

@ -147,26 +147,30 @@ def transfer_modifier(modifier_name, target_obj, source_obj):
if not mod.is_bound: if not mod.is_bound:
continue continue
for i in range(2): for i in range(2):
bpy.ops.object.surfacedeform_bind( with override_obj_visability(obj=target_obj):
{"object": target_obj, "active_object": target_obj}, with context.temp_override(
modifier=mod.name, object=target_obj, active_object=target_obj
) ):
bpy.ops.object.surfacedeform_bind(modifier=mod.name)
elif mod.type == 'MESH_DEFORM': elif mod.type == 'MESH_DEFORM':
if not mod.is_bound: if not mod.is_bound:
continue continue
for i in range(2): for i in range(2):
bpy.ops.object.meshdeform_bind( with override_obj_visability(obj=target_obj):
{"object": target_obj, "active_object": target_obj}, with context.temp_override(
modifier=mod.name, object=target_obj, active_object=target_obj
) ):
bpy.ops.object.meshdeform_bind(modifier=mod.name)
elif mod.type == 'CORRECTIVE_SMOOTH': elif mod.type == 'CORRECTIVE_SMOOTH':
if not mod.is_bind: if not mod.is_bind:
continue continue
for i in range(2): for i in range(2):
bpy.ops.object.correctivesmooth_bind( # TODO Create override for modifier visibility in these cases
{"object": target_obj, "active_object": target_obj}, with override_obj_visability(obj=target_obj):
modifier=mod.name, with context.temp_override(
) object=target_obj, active_object=target_obj
):
bpy.ops.object.correctivesmooth_bind(modifier=mod.name)
fcurves = find_drivers(source_obj, 'modifiers', modifier_name) fcurves = find_drivers(source_obj, 'modifiers', modifier_name)
for fcurve in fcurves: for fcurve in fcurves:
copy_driver(from_fcurve=fcurve, target=target_obj) copy_driver(from_fcurve=fcurve, target=target_obj)