View Full Version : Creating maxscript plugin
Hi,
I'm trying to create a plugin in maxscript. I would like it to be a dialog with one button, which after clicking runs my code.
I created the dialog in visual maxscript editor, I added my code to the button saved it as .vms file. How can I now make a plugin out of it? I'd like my plugin to be available next to the Mixer application in character studio, menu "Apps".
And one more question: what tool use to code? The default editor barely differs from notepad.
Thanx for answers!
|
|
BakerCo
11-10-2006, 01:04 PM
look in the help doc around about I think it is called include or filein, you could have the script in one file and the ui in another and just--
on btnName pressed do ( fileIn "scriptName.ms" )
or something or maybe you could make your code a single function and just -- on btnName pressed do( fnCall() )
however I could be wrong :p
But how can I use the .vms file as a plugin? I mean, is that file all I need?
No you will need to open the vms file in the visual editor, then save it as a .ms file. Then open the .ms file in your choice of editor, the built in one should work fine, maxscript > open. When it opens it should contain a rollout definition.
add an open parenthesis ( to the start of the file, and a closing one ) at the end so that you encompass the rollout info, now add the createdialog ROLLOUTNAME line before the closing paren ) that you added to the bottom.
should look something like this: (yellow are the added elements above)
-- script start
(
-- start of data generated by vms editor
rollout ROLLOUTNAME "Rollout Title" width:100 height:50
(
-- controls and control actions here
)
-- end of data generated by vms editor
createDialog ROLLOUTNAME
)
-- script end
Great, it works just fine. Is it difficult to add a button to 3dstudio's gui so that the button runs my plugin? I'd like it in the "Biped Apps" rolout in character studio
BakerCo
11-11-2006, 11:34 AM
look under cutomize UI, I am at work and can't think how to do it off the top of my head sorry.
-Baker
CGTalk Moderation
11-11-2006, 11:34 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.