ScriptSpot

Forum topic · Scripts Wanted

selective exporter

By quakeman00 · 2011-07-29

Description

hi , i need a script who can select lights , cams individualy and create a checker button for each in a dynamic roolout and a button to export what we have selected in those lights and cams with the checkers , i also need he do the same thing but with all the shapes of the scene (geometry)

thx alot to the one who can make it i need it quickly as posible and i saw my colegue do something similar in a couple of hours . im not enought advanced on max script to make it.

please help me .

and tank you

ps: the export must be a txt file who conserve orientation and position.

Comments (4)

quakeman00 · 2011-07-29

oh , it actualy cant export the light and the cams and the geometry in the same txt file :c and i needed chekerbox for each cam and light on the scene , and 1 checker who select every geometry ont he scene .. not one by one.

it also cant create the txt file .. dont know why :c

but passing probably my mis speaking (im french)
if you can fix it , i would be very very ,happy and ill also may give you some money via paypal if you have msn ofr contatc , since you worked for me for this code .

quakeman00@hotmail.com

if you can fix it ill give you 10$ via paypal monday when ill got my money.

thx

i know 10$ is not mutch but in student and its all i have :c

OK

Anubis · 2011-07-29

check your mail-box

:3 thx

quakeman00 · 2011-07-29

thx ill try it out

Anubis · 2011-07-29

Hmm, its not need to be an expert to write this. Here is something to get started...

rollout roExample "Example"
(
	MultiListBox mlbList
	radioButtons rbnType labels:#("Lights", "Cameras", "Shapes", "Geometry")
	button btnExport "Export"

	on rbnType changed state do
	(
		local objs = case state of
		(
			1: for n in lights collect n.name
			2: for n in cameras collect n.name
			3: for n in shapes collect n.name
			4: for n in geometry collect n.name
		)
		mlbList.items = objs
	)

	on btnExport pressed do
	(
		local objs = for n in mlbList.selection collect \
			getNodeByName mlbList.items[n]
		--export...
		file = createFile "c:\export.txt"
		for o in objs do (
			--format to file (just for ex.):
			format "%, %, %\n" o.name o.rotation o.pos to:file
		)
		close file; free file
	)
)
createDialog roExample

...and then you know what need (can imagine the 'skeleton' of the script), the help file will assist you for the next part ;)