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 664dd9221e - Show all commits

View File

@ -229,6 +229,9 @@ def init_constraints(scene, obj):
def transfer_constraint(constraint_name, target_obj, source_obj): def transfer_constraint(constraint_name, target_obj, source_obj):
# TODO DEBUG WHY TARGETS DISAPPEAR
context = bpy.context # TODO PASS CONTEXT
# remove old and sync existing modifiers # remove old and sync existing modifiers
old_mod = target_obj.constraints.get(constraint_name) old_mod = target_obj.constraints.get(constraint_name)
if old_mod: if old_mod:
@ -248,8 +251,9 @@ def transfer_constraint(constraint_name, target_obj, source_obj):
): ):
if target_constraint.name == name_prev: if target_constraint.name == name_prev:
idx = target_mod_i + 1 idx = target_mod_i + 1
with context.temp_override(object=target_obj):
bpy.ops.constraint.move_to_index( bpy.ops.constraint.move_to_index(
{'object': target_obj}, constraint=constraint_new.name, index=idx constraint=constraint_new.name, index=idx
) )
constraint_target = target_obj.constraints.get(constraint.name) constraint_target = target_obj.constraints.get(constraint.name)
props = [ props = [