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:
continue
for i in range(2):
bpy.ops.object.surfacedeform_bind(
{"object": target_obj, "active_object": target_obj},
modifier=mod.name,
)
with override_obj_visability(obj=target_obj):
with context.temp_override(
object=target_obj, active_object=target_obj
):
bpy.ops.object.surfacedeform_bind(modifier=mod.name)
elif mod.type == 'MESH_DEFORM':
if not mod.is_bound:
continue
for i in range(2):
bpy.ops.object.meshdeform_bind(
{"object": target_obj, "active_object": target_obj},
modifier=mod.name,
)
with override_obj_visability(obj=target_obj):
with context.temp_override(
object=target_obj, active_object=target_obj
):
bpy.ops.object.meshdeform_bind(modifier=mod.name)
elif mod.type == 'CORRECTIVE_SMOOTH':
if not mod.is_bind:
continue
for i in range(2):
bpy.ops.object.correctivesmooth_bind(
{"object": target_obj, "active_object": target_obj},
modifier=mod.name,
)
# TODO Create override for modifier visibility in these cases
with override_obj_visability(obj=target_obj):
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)
for fcurve in fcurves:
copy_driver(from_fcurve=fcurve, target=target_obj)