Auto Hierarchy - Control Objects

In the max file attached I have provided 2 bone chains. The one labeled "What I Want" is what I would like my script to do once I run it. The other bone chain is for you to run the script on. So far my script will create a point helper at the exact pivot of each object you have selected, but not link them, as in the example "What I want". The end result being, a point helper created at each bones pivot, and linking them through the hierarchy in correlation to the hierarchy of the bone chain.

function createPoint =
(
 
    for Cntrl =1 to selection.count do
    (
        Cntrl = selection[Cntrl]
        Control_IK=point wirecolor: red
        Control_IK.size = Cntrl.width*5
        Control_IK.cross = true
		Control_IK.transform = Cntrl.transform
    )
)
 
createPoint()
AttachmentSize
hier.max212 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
JokerMartini's picture

Nice

Nice Garp, that works out well. I actually never used the showLinks property. I always forget about that being in max.

Great stuff.

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

Garp's picture

Something like this:

Select the root of your hierarchy and run this:

fn setCtrlPts theObj thePt:undefined =
(
  local pt = point transform:theObj.transform \
             name:("ctrl_" + theObj.name) \
             wireColor:green \
             showLinks:true
  pt.parent = thePt
  for obj in theObj.children do
    setCtrlPts obj thePt:pt
)
 
setCtrlPts selection[1]

Customize the points to your needs :D

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.