Notifications
Clear all

[Closed] animate visibility for large number of objects

Hello, I’m looking for a script that would automatically switch visibility from 0 to 1 for hundreds of objects in a sequence based on object name (number in it) – I need to achieve same effect as in those movies showing rapidly growing buildings (like “extreme engineering” on discovery channel); so far I only managed to find neon-visibility-animator http://www.scriptspot.com/scripts/MondoMedia/neon.zip but it doesn’t work for some reason

Thanks for help

1 Reply

ok, seems my bro hijacked my account to post the thread, hehe.
Anyway… I wrote this script for him, but maybe someone else will need this kind of tool, so here is the code:


macroScript VisibilityControl category:"Visibility"
(
	rollout Main "Visibility Control"
	(
		group "Create"
		(
		spinner start "Start at: " range:[1,100,1] align:#left
		spinner N "N-th:     " 	range:[1,100,1]	align:#left
		button CreateVisibility "Create Visibility Control" align:#center width:150
		)
		group "Delete"
		(
		button DeleteVisibility "Delete Visibility Control" align:#center width:150
		)

		on CreateVisibility pressed do
		(
			obj = selection as array
			frame = start.value
			for i=1 to obj.count do
			(
				obj[i].visibility = true
				obj[i].visibility = bezier_float()
				(addNewKey obj[i].visibility.controller frame).value = 0
				(addNewKey obj[i].visibility.controller (frame+1)).value = 1
				frame = frame + N.value
			)
		) --end CreateVisiblity
		
		on DeleteVisibility pressed do
		(
			obj = selection as array
			for i=1 to obj.count do
			(
				deleteKeys obj[i].visibility.controller
				(addNewKey obj[i].visibility.controller 0).value = 1
			)
		) --end DeleteVisibility
		
		
	) --end rollout

on execute do createDialog Main Width:250
) --end script


Really simple thing, maybe someone else will find it usefull.

Andrew