Notifications
Clear all

[Closed] Toolbar

Hey Guys…I created a script which would help me create a few buttons which I use as shortcuts to make my life a little life easier since I access them a lot…

Now what I want to do is when I right click above the window of the viewport I can access the reactor,the main toolbar and all…so I was wondering how could I make my script turned into a toolbar with a GUI for every button like the reactor or any other toolbar…

I have attached my current GUI but I want to incorporate it into MAX itself so that it becomes a part of it…

Thanks guys,
Regards,
Entrancea

7 Replies
 JHN

Lookup : cui.RegisterDialogBar and cui.UnRegisterDialogBar in mxs help file, this allows to register a dialog as dockable.

-Johan

Cool…Thanks mate…

But I’ll post my script here…Could you modify it to show me an example…

Cause I just need to see one example…Then I can understand clearly…

Thanks a lot…

Regards,
-Entrancea


rollout makepreview “Make The Preview”
(
button mpreview “Make Preview”
on mpreview pressed do
(
actionMan.executeAction 0 “40033” – Render: Make Preview
)

button pview “Particle View”
on pview pressed do
(
actionMan.executeAction 135018554 “32771” – Particle Flow: Particle View Toggle
)

button rmat “Reset Material Editor”
on rmat pressed do
(
macros.run “Medit Tools” “clear_medit_slots”
)

button show “Show Command Panel”
on show pressed do
(
max hide command panel toggle
)

button sfx “Create FFX Simple Source”
on sfx pressed do
(
Simple_Src size1:6 pos:[0,0,0] isSelected:on Size2:6 Size3:6
)

button ofx “Create FFX Object Source”
on ofx pressed do
(
Object_Src iconSize:6 pos:[0,0,0] isSelected:on
)

)
createdialog makepreview


 JHN

I took the liberty to clean it up a bit.



rollout makepreview "Make The Preview"
(
	local btn_width = 145
	button btn_mpreview "Make Preview" width:btn_width
	button btn_pview "Particle View" width:btn_width
	button btn_rmat "Reset Material Editor" width:btn_width
	button btn_show "Show Command Panel" width:btn_width
	button btn_sfx "Create FFX Simple Source" width:btn_width
	button btn_ofx "Create FFX Object Source" width:btn_width

	on btn_mpreview pressed do actionMan.executeAction 0 "40033" -- Render: Make Preview
	on btn_pview pressed do actionMan.executeAction 135018554 "32771" -- Particle Flow: Particle View Toggle
	on btn_rmat pressed do macros.run "Medit Tools" "clear_medit_slots"
	on btn_show pressed do max hide command panel toggle
	on btn_sfx pressed do Simple_Src size1:6 pos:[0,0,0] isSelected:on Size2:6 Size3:6
	on btn_ofx pressed do Object_Src iconSize:6 pos:[0,0,0] isSelected:on
)

createdialog makepreview width:155
cui.RegisterDialogBar makePreview style:#(#cui_dock_vert, #cui_handles,#cui_floatable )


Cheers,
-Johan

Oh yeah…its much cleaner now…actually I am just getting into Maxscripting and so as you know…heh…I understand the script now and will try to create more scripts like this…Thanks a lot dude…

Regards,
Entrancea

Could you tell me as how to understand Maxscripting in much more detail…like so far all I have done is create shortcuts and all…But what I would really like to do is try to create tools…How should I approach this?

Thanks Dude…

Regards,
Entrancea

 JHN

The best way to start is with the manual that’s shipping with max, and taking apart other’s scripts. If you checkout scriptspot.com you’ll find hundreds of scripts ready to study. Best thing is to think of something you’ll want to do and just do it… learn how to use and navigate the manual, it’s gonna be the completest thing you’ll have to reference maxscript… There’s some books written, but I don’t know how good they are. On http://www.cg-academy.net/ there are DVD’s you can get that should get you started.

More I cannot say really, just jump in and enjoy the ride.

Goodluck,
-Johan

Thanks Johan,

                   appreciate it......will definitely look into it....

Cheers,
Entrancea