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

View File

@ -159,6 +159,7 @@ def init_modifiers(scene, obj):
def transfer_modifier(modifier_name, target_obj, source_obj):
# remove old and sync existing modifiers
context = bpy.context # TODO PASS CONTEXT
old_mod = target_obj.modifiers.get(modifier_name)
if old_mod:
target_obj.modifiers.remove(old_mod)
@ -174,9 +175,8 @@ def transfer_modifier(modifier_name, target_obj, source_obj):
for target_mod_i, target_mod in enumerate(target_obj.modifiers):
if target_mod.name == name_prev:
idx = target_mod_i + 1
bpy.ops.object.modifier_move_to_index(
{'object': target_obj}, modifier=mod_new.name, index=idx
)
with context.temp_override(object=target_obj):
bpy.ops.object.modifier_move_to_index(modifier=mod_new.name, index=idx)
mod_target = target_obj.modifiers.get(mod.name)
props = [p.identifier for p in mod.bl_rna.properties if not p.is_readonly]
for prop in props: