PDA

View Full Version : Simple scripting help needed.


Tak Tak
02-14-2005, 10:28 AM
Hi,

I'm learning maxScripting and have some simple question for you.
Look next script first...
Point pos:[0,0,0] isSelected:on --Create Point Helper

rollout PointSizer "Point Sizer"
(
spinner adjust_spn "Size: " range:[1, 100, 20] type:#integer align:#center

on adjust_spn changed do
$.size = adjust_spn.value

)

createDialog PointSizer 110 25
I think this script is almost OK, but something is missing or something is wrong. Please, give me some advice. All I want is only create Point Helper and adjust size after that.

Thanks.

marktsang
02-14-2005, 12:26 PM
hi,

blah = Point pos:[0,0,0] isSelected:on --Create Point Helper

rollout PointSizer "Point Sizer"
(
spinner adjust_spn "Size: " range:[1, 100, 20] type:#integer align:#center

on adjust_spn changed val do
blah.size = val

)
createdialog pointsizer 100 100

dont know why you want to do this in a scipt there is a size spinner in the modifier panel

mark

Tak Tak
02-14-2005, 12:41 PM
Thanks for reply.

Yes I know there is spinner in modify panel for adjusting point size, but I'm planning to create script what creates multiple points for selected object's pivot. So depends what size is your rig or what ever it is you can create and then check those sizes.

Thanks.

Magicrystal
02-14-2005, 02:00 PM
You just create a rollout, i think you need a window

-------------------------------------------------------------------------
Win_PointSizer = newrolloutfloater "PointSizer" 230 385

Point pos:[0,0,0] isSelected:on
rollout PointSizer "Point Sizer"
(
spinner adjust_spn "Size: " range:[1, 100, 20] type:#integer align:#center
on adjust_spn changed do
$.size = adjust_spn.value
)

addrollout PointSizer Win_PointSizer
--------------------------------------------------------------------------

Magicrystal
02-14-2005, 02:24 PM
ooh... i just found a mistake in your code !

here:
on adjust_spn changed do
it should be:
on adjust_spn changed val do

========================
SORRY ! MARK had already pointed out it :D

CGTalk Moderation
02-14-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.