Texture make unique

Texture make unique

Anonymous
Not applicable
361 Views
1 Reply
Message 1 of 2

Texture make unique

Anonymous
Not applicable

1.pngNeed to make all the texture of the scene unique,Is there maxscript?

0 Likes
362 Views
1 Reply
Reply (1)
Message 2 of 2

Swordslayer
Advisor
Advisor

This should do the trick (replacing each texture with its copy):

 

(
	fn recurseMap mat =
		for i = 1 to (getNumSubTexmaps mat)
			where (local map = getSubTexmap mat i) != undefined do
			(
				setSubTexmap mat i (copy map)
				recurseMap map				
			)

	fn recurseMat mat =
		for i = 1 to (getNumSubMtls mat)
			where (local subMat = getSubMtl mat i) != undefined do
				if getNumSubMtls subMat > 0 then
				(
					recurseMap subMat
					recurseMat subMat
				)
				else recurseMap subMat

	updateSceneMaterialLib()
	for mat in sceneMaterials do
	(
		recurseMat mat
		recurseMap mat
	)
)
0 Likes