Inheritance Flags and Aligning

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  03 March 2012
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!


(
	--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
 
  03 March 2012
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:

	Box02.rotation *= Box04.transform.rotation
	Box02.pos = Box04.transform.pos
 
  03 March 2012
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:

	Box02.rotation *= Box04.transform.rotation
	Box02.pos = Box04.transform.pos

assuming that boxes have the same object-offset matrix)
 
  03 March 2012
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



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 11:33 AM.


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