Create Render Element for each layer

Hi all,

I would like to create a script which add automaticaly a C_Masking render Element for each layer composed of this objects.
I already succed to create a render element for on layer but i don't know how create a loop which scan all layers in a scene.

Can you help me ? :)

Thank you in advance

Comments

Comment viewing options

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

Why not share this script?

Why not share this script?, it could be very useful! Thank

miauu's picture

.

(
	for i = 0 to layerManager.count - 1 do
	(
		layer = layerManager.getlayer i
		format "layer name: % \n" layer.name
		-- add the code that creates Render Element here:
 
	)
)
Huehv's picture

Delete Render Element

Thanks ! It works perfectly
Other question, I look for how to delete a specific render element ...
I find the expression : RemoveRenderElement, but i don't understand how to use it
I succeed delete all render elements but i don't care ...

miauu's picture

.

since you already have some maxscript knowledge check this:

http://www.scriptspot.com/forums/3ds-max/general-scripting/check-for-dup...

Comment viewing options

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