PDA

View Full Version : Simple button question......


fattkid
05-16-2007, 06:51 PM
I was wondeing how to create a simple button to add to my toolbar......
In particular, I would like to have the command "gc()" (or a similiar action/function to Garbage Collector) to my toolbar so I can just clean my scene at the click of a button right before rendering (Rendering hi res models and Max has a tendency to crash unless the scene is cleaned). What would be even cooler is if I could have a button that ran "gc()" and then rendered my image (F9) together. Any suggestions?

I'm searching the forums etc, but I haven't quite found what I'm looking for...Thanks for any replies.

Chman
05-16-2007, 08:26 PM
Something like that ?


macroscript GCButton
buttonText:"GC"
category:"Custom Macros"
toolTip:"Invoke Garbage Collector"
(
gc()
render()
)


Menubar -> MAXScript -> New Script,
then paste the code and hit CTRL+E (or File -> Evaluate All in editor window).

Customize -> Customize User Interface,
switch to the Toolbars tab, browse to the "Custom Macros" category and drag'n'drop the action on a toolbar of your choice :)

Tom

fattkid
05-16-2007, 08:44 PM
That is exactly what I was hoping for...Thank you very much Chman. I need to start learning thios stuff. Your reply is very helpful.

CGTalk Moderation
05-16-2007, 08:44 PM
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.