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 / maxscript for bip's "anchor left /right leg" ? (answered)
  RSS 2.0 ATOM  

maxscript for bip's "anchor left /right leg" ? (answered)
Rate this thread
 
17106
 
Permlink of this thread  
avatar
  • jayjartog
  • Posted: 24 September 2008 07:54 PM
  • Location: Manila, Philippines
  • Total Posts: 9
  • Joined: 13 February 2007 08:28 PM

hi! does anyone know the maxscript command for anchoring the legs of a biped. although motion panel have these buttons, i need to do this thru a scripted rollout using buttons. i can’t seem to find it in maxscript documentation.



Replies: 0
avatar
  • jayjartog
  • Posted: 28 September 2008 09:52 PM

because i can’t delete tis topic, i’ll just have to answer it.

warning: the codes below should only be used if ur creating biped pose collections for pose-to-pose animation thru the copy/paste rollout in motion panel. “biped.deletekeys” will delete all keys of the foot in the timeline. an option is to remove all the biped.deletekeys below but u will loose the ability to remove foot anchors through ur rollout.
--note:anchorL,anchorR,btn36 ,and btn11 are buttons. the maxscript below should be inserted in a rollout. create the 4 buttons inside the rollout.

--then to select the biped controller

pobj=pickobject prompt:"select biped to be processed”
selectedbiped=pobj.controller

--to anchor left foot only
on anchorL pressed do
(
try(
local a=biped.getNode selectedbiped #lleg link:3
local b=biped.getNode selectedbiped #rleg link:3
biped.setplantedkey a
biped.deletekeys b.controller #allkeys
)catch()
)

--to anchor right foot only
on anchorR pressed do
(

try(
local a=biped.getNode selectedbiped #lleg link:3
local b=biped.getNode selectedbiped #rleg link:3
biped.setplantedkey b
biped.deletekeys a.controller #allkeys
)catch()
)

--to anchor both feet
on btn11 pressed do
(
try(
local a=biped.getNode selectedbiped #lleg link:3
local b=biped.getNode selectedbiped #rleg link:3
biped.setplantedkey a
biped.setplantedkey b
)catch()
)

--this will clear all foot anchors
on btn36 pressed do
(
try(
local a=biped.getNode selectedbiped #lleg link:3
local b=biped.getNode selectedbiped #rleg link:3
biped.deletekeys a.controller #allkeys
biped.deletekeys b.controller #allkeys
)catch()
)



Replies: 0
avatar

Interesting, there isn’t any documentation on how to access the actual Anchor “Mode” in the help files. Setting a planted key does give you the resulting key that you would get from anchoring a foot but it doesn’t let you work the same way as you would when anchoring the previous key to hold a pose.

If anyone knows how to access this “mode” I would really appreciate it.



Replies: 0