ScriptSpot

Forum topic · General Scripting

How to add a custom rollout to an object

By maeledar · 2007-12-21

Description

I'm trying to figure out how to add a custom rollout to an object in max 2008, the maxscript help files aren't giving me an example that I can get to work. I suspect it's fairly simple (most things are once you find out how) but the examples just arent working for me.

Any advice will be most welcome :) the data the rollout will hold is very simple, just some properties for our engine to read.

Thanks in advance,

Ron
3D Artist

Comments (2)

explorer-pl · 2011-02-28

Hey. I have a similar problem. I want to add my rollout to an object, but the problem is that I'm doing this from within a scripted plugin, and I get an error:

custAttributes.add requires MSCustAttribDef, got: undefined

What I'm doing is that I'm writing a simple scripted plugin that creates a bunch ob objects. I want two of them to have the same rollout - and I mean exactly the same - so one is just a reference to the other one, or in other words, they all point to the same internal parameters of the scripted plugin.

Any idea how to achieve that? Thanks.

ntashev · 2008-03-21

Here is a simple script to show the idea:


cust_attrib = attributes "test_attrib"
(
parameters main rollout:test_roll
	(
	some_value type:#worldunits ui:spn1

	)
rollout test_roll "Simple Teste"
	(
	label lbl1 "Here we are"
	spinner spn1 "Some Value"
	button btn1 "Press Me... Slowly"
	)
)

CustAttributes.add $.baseobject cust_attrib

Just select an object and run the script