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):
# TODO DEBUG WHY TARGETS DISAPPEAR
context = bpy.context # TODO PASS CONTEXT
# remove old and sync existing modifiers
old_mod = target_obj.constraints.get(constraint_name)
if old_mod:
@ -248,9 +251,10 @@ def transfer_constraint(constraint_name, target_obj, source_obj):
):
if target_constraint.name == name_prev:
idx = target_mod_i + 1
bpy.ops.constraint.move_to_index(
{'object': target_obj}, constraint=constraint_new.name, index=idx
)
with context.temp_override(object=target_obj):
bpy.ops.constraint.move_to_index(
constraint=constraint_new.name, index=idx
)
constraint_target = target_obj.constraints.get(constraint.name)
props = [
p.identifier for p in constraint.bl_rna.properties if not p.is_readonly