Organize Rollouts


hey there!

I’m looking for a way to properly organize my scripts in 3ds max.
What I want is to have a rollout for each 3D department (here “first” and “second”) docking on a single bar like so:


For now all I got is they aren’t next to each other, but one above the other.

here’s my code:
global top_handle = newRolloutFloater “” 0 20

rollout myRolloutA “first” height: 100 width: 100
_ button bt “test” pos:[0,0] width: 100 height: 20_

rollout myRolloutB “second” height: 100 width: 100
_ button bt_ “test 2” pos:[0,0] width: 100 height: 20_
button bt2_ “test 2” pos:[110,0] width: 100 height: 20_
button bt3_ “test 2” pos:[220,0] width: 100 height: 20_

cui.registerDialogBar top_handle style:#(#cui_floatable, #cui_dock_top, #cui_handles, #cui_max_size)
cui.dockDialogBar top_handle #cui_dock_top

addRollout myRolloutA top_handle
addrollout myRolloutB top_handle

I tried to add B to A but it doesn’t work.
Can you help me out with this?
Thank you


that’s impossible , and the idea for a plugin is a little stupid
if you insist on that , you can use dotnet to do


Could you help me with .NET? I never used it.
If you just give me the “template” I’ll be able to reproduce and adjust it later without problem. I only use maxscript.



you can find same examples in maxscript manual
if no need to dock as toolbar , you can write a form in VS , and generate a dll file for mxs to show


“Dotnet rollout” doesn’t give me any example except for creating a website page in dotnet?

searched for “dotnet rollout”


just learn how to use dotnet , what you want will be done with an embedded panel control , in VS , you can use dock window


Do I really have to learn a whole new language just for that? Aren’t there some examples that I could simply adjust to match my goal? To me it doesn’t seem like something complicated for a dotnet user.

And I have no idea where to start if I must learn. There is no tutorial for dotnet/3ds max and microsoft website didnt help much


no one let you to learn dotnet , you should learn how to use it in mxs , there are lots of dotnet class for mxs to use , with them you can do what can’t do before .
if not want to spend time on c#/c++/python , you’d better not ask too much for the UI , mxs not a programming language , it’s a script language , only basic functions for that.


if you cannot do something, it does not mean that it is impossible. Of course, this is possible to do using pure the MXS.

what is the difference between ‘programming’ and ‘scripting’ languages in your understanding?


there are a lot of examples, snippets, and templates of using .NET and MXS together for UI creation on this forum. Unfortunately it’s hard to find them with new forum’s interface. But you can try…

dotnetobject, dotnetclass, forms, form, maxform are keywords for search.


I’m not think mxs allow add a subrollout to another subrollout

script language is a software based language , such as mel/action script,
programming language is a environment based language , such as vb/js
that’s it


this is possible to do using pure the MXS.

What a relief! Can you tell me a bit more about how that would be done? :slight_smile:


i can say the same - there are a lot of examples on this forum including mine. you can use subrollouts, registed rollout dialogs and rolloutfloaters, toolbars… there are many way to do it.

about languages… in our case there are only to types. language which allows to make tools and which doesn’t allow.
MXS is powerful enough to make complete tools in the MAX environment.


OMG the search option is a mess… I thought by clicking on your nickname I’d find all of your posts but no…
Guess I have to check all the threads one by one…


This is a solution that kinda works:

rollout parent “parent” height:200 width: 500
subrollout test1 “test1”
subrollout test2 “test2”
rollout test1a “test1a” width:100
spinner test1as “test1as” align:#left

rollout test2a “test2a” width:100 height: 100
spinner test2as “test2as” align:#left

createdialog parent

AddSubRollout parent.test1 test1a
AddSubRollout parent.test2 test2a

parent.test1.width = 200
parent.test1.height = 100
parent.test1.pos = [250,0]

parent.test2.pos = [0,0]
parent.test2.width = 200
parent.test2.height = 100

The problem is: if I remove the first subrollout the second stays in the middle. I’d like to have them always align to the left. Is it possible?


Google search works better. use CGTalk and my name as keywords.


I see , may our cognition different
i think jen84’s need is an embedded rollout like first image shows , is it may achieve by mxs ? i tried but got incorrect result .

i didi that effect by dotnet such as

rollout AEI_dotnetUI_example_Rot "AEI_dotnetUI_example_Rot"
	dotnetcontrol main_pn "panel" width:300  height:300 pos:[0,0]
	local d_CI= dotnetclass "System.Activator"
	local d_size= dotnetclass "System.Drawing.size"
	local d_pos= dotnetclass "System.Drawing.Point"
	local pos
	fn d_color_fn n = ((dotNetClass "System.Drawing.Color").FromArgb n[1] n[2] n[3])
	fn toggle s e =
		if s.tag[1]==1 then
			s.parent.height = 0
			s.parent.height = s.tag[2]
	fn startdrag s e =
		pos = mouse.screenpos
	fn drag s e =
		if (e.Button == e.Button.Left) then
			s.parent.Left += mouse.screenpos.x - pos.x += mouse.screenpos.y - pos.y
			pos = mouse.screenpos
	on AEI_dotnetUI_example_Rot resized size do
		main_pn.size =d_CI.CreateInstance d_size #(size[1],size[2])
	on  AEI_dotnetUI_example_Rot open do
		main_pn.backcolor = d_color_fn [50,50,50]

		rollout_top=dotnetobject "panel"
		rollout_top.size = d_CI.CreateInstance d_size #(250,250)
		rollout_top.location = d_CI.CreateInstance d_pos #(10,10)
		rollout_top.autosize = true

		label_top= dotnetobject "label"
		label_top.text = "D-click to toggle_top"
		label_top.height = 18
		label_top.backcolor = d_color_fn [170,170,170]
		label_top.dock =
		dotnet.addeventhandler label_top "DoubleClick" toggle
		dotnet.addeventhandler label_top "MouseMove" drag
		dotnet.addeventhandler label_top "MouseDown"startdrag

		panel_top=dotnetobject "panel"
		panel_top.backcolor= d_color_fn [50,50,100]
		panel_top.dock = panel_top.dock.fill

		rollout1 = dotnetobject "panel"
		rollout1.size = d_CI.CreateInstance d_size #(100,100)
		rollout1.location = d_CI.CreateInstance d_pos #(10,30)
		rollout1.autosize = true

		label1=  dotnetobject "label"
		label1.text = "D-click to toggle1"
		label1.dock =
		label1.backcolor = d_color_fn [70,70,70]
		label1.height = 18
		dotnet.addeventhandler label1 "DoubleClick" toggle
		dotnet.addeventhandler label1 "MouseMove" drag
		dotnet.addeventhandler label1 "MouseDown"startdrag

		panel1= dotnetobject "panel"
		panel1.backcolor= d_color_fn [100,0,70]
		panel1.dock = panel1.dock.fill

		label1.tag = #(1,rollout1.height)

		rollout2 = dotnetobject "panel"
		rollout2.size = d_CI.CreateInstance d_size #(100,100)
		rollout2.location = d_CI.CreateInstance d_pos #(120,30)
		rollout2.autosize = true

		label2=  dotnetobject "label"
		label2.text = "D-click to toggle2"
		label2.dock =
		label2.backcolor = d_color_fn [70,70,70]
		label2.height = 18
		dotnet.addeventhandler label2 "DoubleClick" toggle
		dotnet.addeventhandler label2 "MouseMove" drag
		dotnet.addeventhandler label2 "MouseDown"startdrag

		panel2= dotnetobject "panel"
		panel2.backcolor= d_color_fn [100,0,70]
		panel2.dock = panel2.dock.fill

		label2.tag = #(1,rollout2.height)

		label_top.tag = #(1,rollout_top.height)

		rollout1.controls.addrange #(label1,panel1) 
		rollout2.controls.addrange #(label2,panel2) 
		panel_top.controls.addrange #(rollout1,rollout2)
		rollout_top.controls.addrange #(label_top,panel_top)
		main_pn.controls.add rollout_top
createdialog AEI_dotnetUI_example_Rot 300 300