Freeze by category

Hi there.. i have no clue whatsoever to scripting, just love all the smart stuff that make your day so much easyer.. like scripts..
well i could realy use a "freeze by category" script, don´t even know if it is a simple or horrible task..-you tell me..
cheers/tue

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

Try this:

--******************************************************************************************************
-- Created: 		08-08-2014
-- Last Updated:	08-08-2014
-- Version:			1.00
--
-- Author :  Kostadin Kotev / [email protected] / http://miauumaxscript.blogspot.com/
-- Version:  3ds max 2009 (10) (should work in older versions too!)
--
-- Discription: Freeze objects by category
--	If nothing selected will unfrreze all objects
--	If spline object is selected it freeze only the spline objects
--	If light object is selected it freeze only the light objects
-- Usage: RUN IT
--
--******************************************************************************************************
-- MODIFY THIS AT YOUR OWN RISK
 
-- uncoment 4 lines below and save it. Then you can execute as macro script and find it in "miauu" category
-- macroscript miauuFreezeByCategory
-- category:"miauu"
-- tooltip:"Freeze By Category"
-- buttonText:"Freeze By Category"
(	
	curO = selection[1]
	if curO == undefined then
	(
		max unfreeze all
	)
	else
	(
		try
		(	
			case (superclassof curO) of
			(
				GeometryClass: (freeze geometry)
				Shape: (freeze shapes)
				Light: (freeze lights)
				Camera: (freeze cameras)
				Helper: (freeze helpers)
				SpacewarpObject: (freeze spacewarps)	
			)
			case (classof curO) of
			(
				PF_Source: (freeze particles)
				PCloud: (freeze particles)
				Spray: (freeze particles)
				SuperSpray: (freeze particles)
				Snow: (freeze particles)
				Blizzard: (freeze particles)
				PArray: (freeze particles)
 
				Biped_Object: (freeze bones)
				BoneGeometry:(freeze bones)
			)
		)catch()
	)
)

Select the objects which category you want to freeze and run the script.
If the selected object is spline all splines will be freezed.
If the selected object is geometry object all geometry objects will be freezed. And so on.
To unfreeze all objects in the scene select nothing and execute the script.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.