As the Array can be CustAttribute parameters??

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
Old 04 April 2012   #1
As the Array can be CustAttribute parameters??

As the Array can be CustAttribute parameters ??

theCA= attributes theDATA
parameters main rollout:rol
myArray type:#array ----- ???

rollout rol "aaa"


Obviously the above code will ERROR. so how to achieve it ??

Last edited by easyfrog : 04 April 2012 at 09:28 AM.
Old 04 April 2012   #2
Arrays in parameter blocks are called Tabs. They are statically typed though, so you'll have to specify something like #IntTab, #StringTab, and so on.
Old 04 April 2012   #3

	--based on code by denis Trofimov
	fn applyObjectData node theArray:#() = if isvalidnode node do
		str = "attributes objectData 
			rollout paramsRollout \"Parameters\"
				dropdownlist nodesDd items:% pos:[0,0]
		ss = stringstream ""
		format str(with printallelements on theArray as string) to:ss
		objectData = execute (ss as string)
		free ss
		custAttributes.add node objectData baseobject:on
		select node --return the node as $
		max modify mode -- now the rollout was created the first time	
	local myBox = box(); = "theBox"
	local myArray = #("test1","test2",(3.14 as string),
	applyObjectData myBox theArray:myArray

Everything you store in the array will have to be a string, but you can cast the strings back to their original data types, if that information is available.

Old 04 April 2012   #4
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 04:19 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.