Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Create a toolbar like Custom User Interface menu but from script
  RSS 2.0 ATOM  

Create a toolbar like Custom User Interface menu but from script
Rate this thread
 
22358
 
Permlink of this thread  
avatar
  • kittikun
  • Posted: 05 February 2009 12:59 AM
  • Total Posts: 20
  • Joined: 05 February 2009 08:55 AM

Hi all,

I’m currently working on a tool and I want to have the toolbar using the same system as the custom interface menu. Users should be able to remove or add buttons like any toolbar already there.

I know that to make commands appear in the list, I have to make macroScripts but I can’t find a way to create a tool bar from script.

I know how to do it using the interface, but I want to show the toolbar with some basics buttons when the plugin is first loaded.

All those info are stored in a cui file. I’m not sure how to offer this, I don’t want to force a cui file and have users to redo all their ui…

Thank you for your help



Replies: 0
avatar

You could just make a new dialog with buttons for the functions or scripts you want to reference.  Is there functionality in the toolbar that you are looking for specifically that a dialog does not have?  Oh, and if you want it to open like a toolbar on max start you can put the script in the startup scripts folder and it can be created on max startup.  Also, the dialogs can be dockable.



Randall Hess
Senior Technical Animator
THQ, Volition Inc.

Replies: 0
avatar
  • kittikun
  • Posted: 05 February 2009 10:58 PM

Yes, I need the buttons to be removed or added by drag drop like any other toolbars you can create from the CUI menu.
And the toolbar must appears in the CUI list so even if I reproduce something that looks the same, it won’t meet my final goal.

In the end, I made a script that get the current file with cui.getConfigFile() and alters it to insert the toolbar I want.

Thanks for the reply



Replies: 0