Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / clone then mirror existing animation
  RSS 2.0 ATOM  

clone then mirror existing animation
Rate this thread
 
47001
 
Permlink of this thread  
avatar
  • Location: Sarnia, Ontario CANADA (ehh)
  • Total Posts: 262
  • Joined: 22 August 2006 08:13 AM

i have created 500 point helpers with animation created by pflow.

When I clone and mirror the animation the mirror isn’t true.

Is there a script way to copy each of the objects and then invert
in this case the pos.z???? (flip top to bottom)

Thanks



Replies: 1
/img/forum/dark/default_avatar.png

Simply copy them and multiply their pos Y axis by -1

see this forum:
http://www.scriptspot.com/forums.../how-to-store-object-keys

Author: Anubis

Replied: 07 September 2010 07:02 AM  
avatar
  • Location: Sarnia, Ontario CANADA (ehh)
  • Total Posts: 262
  • Joined: 22 August 2006 08:13 AM
  • Permlink of this post

This script, when working with 500 objects will
only invert frame #0.

That’s all it would do.



Replies: 2
/img/forum/dark/default_avatar.png

Are you sure? I not see any reason the script to not work for you.
It multiply each key value on each object position [axis] controller.keys

function flipPositionKeys axis =
(
    
userSel getCurrentSelection ()
    for 
obj in userSel do
    (
        
userKeys obj.position.controller[axis].controller.keys
        
if userKeys.count do
            for 
k in userKeys do k.value *= -1
    
)
)

flipPositionKeys 2 -- Y axis
Author: Anubis

Replied: 07 September 2010 09:49 AM  
/img/forum/dark/default_avatar.png

Looking briefly at it, it should work for all keys (at all frames) for the specified controller.

userKeys obj.position.controller[n].controller.keys

Creates essentially an array of all the keys for the specified axis which you can then loop through and do what you will to each key.

Author: Steve_Curley

Replied: 07 September 2010 09:51 AM  
avatar
  • Location: Sarnia, Ontario CANADA (ehh)
  • Total Posts: 262
  • Joined: 22 August 2006 08:13 AM
  • Permlink of this post

works here at home with your mini-script but the linked script on that webpage
didn’t work.  Worked really quick here at home on my 11 days left-max 2011 demo!



Replies: 0
avatar
  • Location: Sarnia, Ontario CANADA (ehh)
  • Total Posts: 262
  • Joined: 22 August 2006 08:13 AM
  • Permlink of this post

Mark Pigott 07 September 2010 06:52 PM

works here at home with your mini-script but the linked script on that webpage
didn’t work.  Worked really quick here at home on my 11 days left-max 2011 demo!

And I could finish this R&D with the script thanks!

http://vimeo.com/14783493



Replies: 0