PDA

View Full Version : ultra simple but i can't achieve it! Help


artichaud
02-24-2006, 10:48 AM
hello,

i m new in maxscript and i can't make a sript with a select function!

in fact i built a character and i want to create a button in a custom attribute. when i click it that will select an object in the rig, these one is hide by the mesh that's why i want to make it accessible whith a button.

i tried the function:
obj = getnodebyname "Point05"
select obj

sole in a script it works but as soon as i put it in a custum attribute nothing happens.
there is the script:

--ca=custAttributes.getDef $.modifiers[1].langueCtrl
ca=attributes langueCtrl
--redefine:ca
(
parameters params rollout:langueMove
(
)
rollout langueMove "Langue Select"
(
button lanSelect "select"
)
on lanSelect pressed do
(
obj = getnodebyname "Point05"
select obj
)
)
custAttributes.add $.modifiers[1] ca

So if someone can take few seconds to explain me...
Thanks

Zbuffer
02-24-2006, 02:19 PM
Hi, this works for me ...

ca=attributes langueCtrl
(
rollout langueMove "Langue Select"
(
button lanSelect "select"
on lanSelect pressed do
(
local obj = getnodebyname "Point01"
select obj
)
)
)
custAttributes.add $ ca baseobject:true
seams the ')' for the rollout was misplaced...

artichaud
02-24-2006, 03:00 PM
thank you man,

nothing else to add except thanks again.

CGTalk Moderation
02-24-2006, 03:00 PM
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.