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 / Creating a macro to apply an action to bones
  RSS 2.0 ATOM  

Creating a macro to apply an action to bones
Rate this thread
 
37298
 
Permlink of this thread  
avatar
  • Nate Dog
  • Posted: 01 December 2009 03:36 AM
  • Total Posts: 7
  • Joined: 12 February 2009 05:10 PM

Ok I’m trying to create a script that will allow me to put a position list and a position constraint to all the bones I select.  I created a macro using the max script listener.  I placed the macro into a new toolbar so I can just click it and apply the action I want.  The macro works when I only select one bone at a time, but I would like it to work when I select more than one bone at a time.  Can anyone please help me on this thanks.
The code now

macroScript Putting position list postion constraint
category:"DragAndDrop"
toolTip:"”
(
$.pos.controller = position_list ()
$.pos.controller.Available.controller = Position_Constraint ()
)

Sorry the specs
3D studio max 2010 x64bit XP pro
Intel quad-core 2.4
Nividia quadro 1700



Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14445
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

2 Tips.

Put your Max version (and brief system specs) in your sig - important to know due to changes in MXS between versions.

Always put your code snippets in [ CODE ] ... [ /CODE ] tags - the forum display messes with code something rotten if it’s just in the post without the tags.

(
for obj in selection do
   
(
   obj
.pos.controller position_List()
   obj
.pos.controller.available.controller position_Constraint()
   )
)


Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 0
avatar
  • Nate Dog
  • Posted: 01 December 2009 08:16 AM

Thanks soooo much that helps me out a lot.  Ive been having problems with this for two days now.



Replies: 0