Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Dock floating UI to a specific location

Dock floating UI to a specific location

Anonymous
Not applicable
2,071 Views
9 Replies
Message 1 of 10

Dock floating UI to a specific location

Anonymous
Not applicable

I have a tools menu I've made and I'd like it to be docked in a specific location when I load Max.

 

How can I do this?

If you look at this gif you can see that the floating ui is loaded when Max does, I want to to stay where its docked at the end of the gif.
Dock_UI.gif

0 Likes
2,072 Views
9 Replies
Replies (9)
Message 2 of 10

malcomarmstrong
Advocate
Advocate

At first glance, you will probably need to create a custom .mnu file or have the code for the ui form part of a start up script that is executed as max opens or just after max has opened. We do a similar thing where we have our own toolbars, ui elements and other custom workspaces based around our toolset. You may even be able to have a modified max file as the default file to open with that has those elements stored as callbacks or some other method.

0 Likes
Message 3 of 10

Anonymous
Not applicable

Thank you for your reply 🙂

0 Likes
Message 4 of 10

blakestone
Collaborator
Collaborator

This example docks a basic GUI to the left-side, you can adjust the style to enable/disable features and docking position. Hope this helps?

 

global gui_handle
(
	fn gui_destroy = (
		try (cui.unregisterDialogBar gui_handle) catch()
		try (closeRolloutFloater gui_handle) catch()
		gui_handle = undefined
	)
	
	if (gui_handle == undefined) then (
		rollout gui_rollout1 "Title : Rollout1" (
			label gui_label "My Label #1..." pos:[5,5] width:100 height:20
		)
		
		rollout gui_rollout2 "Title : Rollout2" (
			label gui_label "My Label #2..." pos:[5,5] width:100 height:20
		)
		
		gui_handle = newRolloutFloater "Title : Script" 244 400
		addRollout gui_rollout1 gui_handle rolledUp:false border:true
		addRollout gui_rollout2 gui_handle rolledUp:false border:true
		cui.RegisterDialogBar gui_handle minSize:[0, 0] maxSize:[250, 400] style:#(#style_titlebar, #cui_floatable, #cui_dock_left, #cui_dock_right, #cui_handles) escapeEnable:false
		cui.dockDialogBar gui_handle #cui_dock_left
	)
	else ( gui_destroy() )
)
--------------------------------------------------------------------------------------
Technical 3D Graphic Artist
Autodesk 3dsMax 2015 - Service Pack 4
--------------------------------------------------------------------------------------
0 Likes
Message 5 of 10

Anonymous
Not applicable

Thank you for your reply. 

 

Looking further into this it doesnt seem like you can create tabs as part of the UI.

 

Unless anyone else has any suggestions?

0 Likes
Message 6 of 10

denisT.MaxDoctor
Advisor
Advisor

leave the user a way how to organize his/her UI. for example, I do not like it when someone does it for me.

give a reason why you can do it better 😉

Message 7 of 10

Anonymous
Not applicable

@denisT.MaxDoctorwrote:

leave the user a way how to organize his/her UI. for example, I do not like it when someone does it for me.

give a reason why you can do it better 😉


I completely agree, however in this case I'm the user 🙂

Thanks for your reply.

0 Likes
Message 8 of 10

blakestone
Collaborator
Collaborator

was what i posted helpful at all?

--------------------------------------------------------------------------------------
Technical 3D Graphic Artist
Autodesk 3dsMax 2015 - Service Pack 4
--------------------------------------------------------------------------------------
0 Likes
Message 9 of 10

Anonymous
Not applicable

@blakestonewrote:

was what i posted helpful at all?


It was thank you. 
I still cant find a solution to tabbing ui though. But for now what you posted was useful.

0 Likes
Message 10 of 10

malcomarmstrong
Advocate
Advocate

Perhaps then, a custom python or .Net interface parented to the Max window will help if you cant get tabbed interfaces to work. Do you have any images of what you want it to look like? By that, I mean when I am doing UIs to go into any particular application, I mock up a UI image to show how I want it, but thats just a working practice of mine, so just asking if thats something you do too.

0 Likes