Notifications
Clear all

[Closed] Copy and paste morph keys

Hi,

Ok well what I need to do is to copy the animation from one morpher modifier and paste it into another. The two character morphs are same in number and named similarly. I tried the copypastekeys() function but needs a controller to copy keys from. Can someone help me with this please,

Regards,
Vikram

2 Replies

Hey Vikram, you should be able to just copy the controllers. Try this code, just replace $Sphere01 and $Box01 with the object that has the morph data and the object that doesn’t respectively. One note: the way I’m retrieving how many targets the first object has depends on there not being any empty slots between occupied slots in the morpher modifier.


objectA = $Sphere01
objectB = $Box01

morphCount = 1
while (WM3_MC_HasData objectA.morpher morphCount) == true do
(
morphCount += 1
)
morphCount -= 1

for i = 1 to morphCount do
(
	objectB.morpher[i].controller = copy objectA.morpher[i].controller
)

–Jon

Hey!

This worked. Thanks a lot. I couldn’t get the syntax “objectB.morpher[i].controller = copy objectA.morpher[i].controller”. Thanks for that

Regards,
Vikram