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 CLOSED
 
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
Or:


(
	--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(); myBox.name = "theBox"
	local myArray = #("test1","test2",(3.14 as string),myBox.name)
	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.
 
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 09:23 PM.


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