CheckButton help

Hello,

I'm new to the maxscript and i need some help from you.

I created an rollout with some buttons that runs different types of maxscripts. However, now i want to create a checkbutton (like a ON/OFF button) and when it is pressed (ON) runs a macro script; then when is pressed again (OFF), the macro script will stop.
I tried with the button function and it worked fine.
Can be done with the checkbutton?

Here is the script:

try (closerolloutfloater Utilities) catch()	
rollout ro_skin "Skin Utilities"
(
button skinblend "Blend" pos:[10,10] width:60 height:16 align:#center
on skinblend pressed do
(
macros.run "Skin" "BlendModeOnOff"
)
)
 
Utilities = NewRolloutFloater "Eek Utilities" 180 300
addRollout ro_skin Utilities rolledup:false
 

Thank you in advance,
Mihai.

Comments

Comment viewing options

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

EXAMPLE Button checkbutton

EXAMPLE

Button
checkbutton chk_region "Region" pos:[8,32] width:76 height:20 toolTip:"Toggle Region ON/OFF"
 

Button Action
on chk_region changed state do
if state then
         (
         chk_region.text = "Region ON"
         setRenderType #region
         )
else
         (
        chk_region.text = "Region OFF"
        setRenderType #view
         )

Copy these parts into your script not deleting what you have and take a look at the code. Notice that when you press the button the text toggles to say Region ON or Region OFF

victorgilbert's picture

You can done it with check

You can done it with check button but that is a little bit complicated process. You have to recode for check box. Full code will be different from this. But this is possible try it you can do it.

  • This particular ruby fortune free play this is actually the very best that right now there is for online gambling.

Comment viewing options

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