Notifications
Clear all

[Closed] rollout dialog not showing

for some reason my Maxscript dialogs stopped showing up…I know the code is fine, but for some reason the dialog rollout is nowhere to be seen…any suggestions?

6 Replies
 j83

Are you using,

createDialog <rollout name>"

or creating a floater and adding a rollout to it or something else?

example

rollout myMoleculeMaker “Molecule Maker” width:250 height:350
(
checkbox animated “Animated” pos:[12,137] width:68 height:15
spinner sp_wireThickness “” pos:[99,13] width:114 height:16
button createButton “Create” pos:[12,164] width:114 height:32
label lbl1 “Molecule Radius” pos:[13,13] width:79 height:18
)

 j83

This will work,


  (
  rollout myMoleculeMaker "Molecule Maker" width:250 height:350
  (
	   checkbox animated "Animated" pos:[12,137] width:68 height:15
	   spinner sp_wireThickness "" pos:[99,13] width:114 height:16
	   button createButton "Create" pos:[12,164] width:114 height:32
	   label lbl1 "Molecule Radius" pos:[13,13] width:79 height:18
  )
  
  createDialog myMoleculeMaker
  )

Also, check the Maxscript reference for all the extra options.

what would I do without you lol

thats strange syntax why is there an open bracket before the rollout function? sorry I am new to Maxscript, have a lot of experience with actionscript tho

 j83

I just enclosed everything in parenthesis. Doing this helps ensure any extra stuff would stay in its local scope. However, you could remove that, especially if you want to be able to destroy the old dialogue if you re-run the script.

Also, enclosing your scripts in parenthesis also limits the amount of stuff pushed out to the Maxscript listener window.

Also, you’ll see a lot of variables being prefaced with “local” before the variable name. This helps “protect” your script if there’s a chance there’s another script in your scene that’s been spitting out global variables.

C# has somewhat similar things with functions, etc., not sure about actionscript.

You can read “Local and Global Variables” in the Maxscript reference.