Asset Pipeline v2 #145
@ -224,6 +224,8 @@ def transfer_modifier(modifier_name, target_obj, source_obj):
|
|||||||
{"object": target_obj, "active_object": target_obj},
|
{"object": target_obj, "active_object": target_obj},
|
||||||
modifier=mod.name,
|
modifier=mod.name,
|
||||||
)
|
)
|
||||||
|
if source_obj.animation_data is None:
|
||||||
|
return
|
||||||
fcurves = core.find_drivers(
|
fcurves = core.find_drivers(
|
||||||
source_obj.animation_data.drivers, 'modifiers', modifier_name
|
source_obj.animation_data.drivers, 'modifiers', modifier_name
|
||||||
)
|
)
|
||||||
@ -288,6 +290,15 @@ def transfer_constraint(constraint_name, target_obj, source_obj):
|
|||||||
new_target.target = target_item.target
|
new_target.target = target_item.target
|
||||||
new_target.subtarget = target_item.subtarget
|
new_target.subtarget = target_item.subtarget
|
||||||
|
|
||||||
|
if source_obj.animation_data is None:
|
||||||
|
return
|
||||||
|
fcurves = core.find_drivers(
|
||||||
|
source_obj.animation_data.drivers, 'constraints', constraint_name
|
||||||
|
)
|
||||||
|
|
||||||
|
for fcurve in fcurves:
|
||||||
|
core.copy_driver(from_fcurve=fcurve, target=target_obj)
|
||||||
|
|
||||||
|
|
||||||
# MATERIAL SLOT
|
# MATERIAL SLOT
|
||||||
def material_slots_clean(obj):
|
def material_slots_clean(obj):
|
||||||
|
Loading…
Reference in New Issue
Block a user