[Closed] visual maxscript editor
Hej Guys,
Does anybody knows andy other editor for creating ui in/for 3dsmax?
I was always doing it by hand because of different limitations in the past.
It seems those limitation fixes are still pending… :curious:
for instance Such as these:
viseditor exports names without quotes into the dropdownbox array (ok)
spinner width are not the same as in the editors, since fieldwidth params is not exported, not defined at all. (serious)
Any other way to deal with the ui than the gool old pixelruler and typing.
this is a bit overboard, but you could write a script that lets you design the scripts UI in max’s viewport. you could set snap to be at 1 unit, similar to 1 pixel, then you could create boxes that represented UI elements. maybe even write what they represented as custom attributes to the 3d mesh. maybe use radiobuttons to give the user a selection (ex: button, checkbox, check button, dropdown etc…). then press a button and have the script write a maxscript for the UI elements based on the boxes position, size, and CAs. crazy idea for sure, but I’d probably enjoy laying out the UI in max’s viewport.
or you could layout all the UI elements in a program like Illustrator, then import the vectors (or just create spline(s)/shapes in max), then write a script that converts the vector data into UI elements based on their color value… for example:
--lets say you had a button that made a red rectangle
on XXX pressed do(myShape = Rectangle length:20 width:120 cornerRadius:0 pos:[10,30,0] wirecolor:(color 255 0 0))
--press another button, and then based on the shape properties, create a UI element string
on XXX2 pressed do(if myShape.wirecolor == (color 255 0 0) then (
myString = "button mybutton1 "shape name" width:myShape.width height:myShape.height pos:[myShape.pos.x, myShape.pos.y]"
)
--then you'd need to write that string to a file...properly formatted of course :)
A bit of work, but it may be worth it if you’re just laying out the scripts UI.
as an even more far fetched alternative, you could layout a script’s UI in a program like sketchflow, then write a script to read the sketchflow file and convert that into maxscript. it would depend on how the sketchflow file is encoded, but you may be able to get all the values you need from it. certain UI elements wouldn’t be available, like the checkbutton (as that doesn’t exist in sketchflow).
…and I’d bet that dotNet could be used to build a visual editor too.
This does seem a bit overboard, but I suppose once you have it, it would be nice to have and make it alot faster/easier to setup UI. Also might be somewhat fun.
I don’t think coding all of that would be too hard, just would take time.
Yeah I thought of that, and you all would happily participate in it,.
I would suggest never use the Visual Maxscript editor, it creates messy code, spaghetti-like UI controls, and hard-codes all UI positions which makes it very time consuming to manage and add new functionality. The Visual Maxscript editor was abandoned by Autodesk a long time ago and I don’t think they’re going to finish it.
Instead of using the editor, just use things like
button myCoolButon "Make Something" across:2 align:#left
button myCoolButton2 "Do Something" align:#left
label myCoolLabel "Hello There" offset:[0,15]
etc.
I knew about the align:#, but had never seen the offset: before. That could come in pretty handy!