CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 03-05-2012, 08:30 PM   #1
martinez
Expert
 
martinez's Avatar
portfolio
Juan Martinez
Animator
Verse, Inc
Dallas, USA
 
Join Date: Feb 2002
Posts: 206
Send a message via ICQ to martinez Send a message via AIM to martinez
Inheritance Flags and Aligning

I bumped into this problem recently, but I haven't found a solution that works.

I'm making an animated align tool. (To align FK to IK over the active time range.) Sometimes animators want to disable rotation inheritance while they are working. And that's where this problem pops up.

If I disable inherit rotation on an object I can no longer align by setting the transform. The Align Tool in max still works, but I can't find a way to align with only MaxScript.

In the example below Box02 doesn't align to Box 04. Anyone have any ideas I can do to align an object with inherit rotation turned off?

Thanks in advance by the way!

Code:
( --CREATE SOME TEMP BOXES delete Objects Box01 = Box pos:[0,0,0] Box02 = Box pos:[30,0,0] Box03 = Box pos:[-30,0,0] Box04 = Box pos:[-60,0,0] --PARENT THE BOXES TO THE FIRST BOX Box02.parent = Box01 Box03.parent = Box01 --TURN OFF INHERIT ROTATION setInheritanceFlags Box02 #{1..3,7..9} --NEED TO DRAW THE VIEW OR THE INHERIT FLAGS ARE NOT SET max views redraw --ROTATE THE FIRST BOX rotate Box01 (angleaxis 45 [0,0,1]) --ALIGN THE BOXES Box03.transform = Box04.transform Box02.transform = Box04.transform )
__________________
Juan Martinez | Blog | Animator
 
Old 03-05-2012, 09:32 PM   #2
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,334
Send a message via ICQ to denisT
first of all it's not a good idea to allow animators change inheritance flags during animation. it will break an animation for sure... but if you still want to align your boxes:
Code:
Box02.rotation *= Box04.transform.rotation Box02.pos = Box04.transform.pos
 
Old 03-05-2012, 10:15 PM   #3
3ak
Know-it-All
 
Join Date: Dec 2002
Posts: 495
Quote:
Originally Posted by denisT
first of all it's not a good idea to allow animators change inheritance flags during animation. it will break an animation for sure... but if you still want to align your boxes:
Code:
Box02.rotation *= Box04.transform.rotation Box02.pos = Box04.transform.pos

assuming that boxes have the same object-offset matrix)
 
Old 03-05-2012, 10:15 PM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:30 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.