254 Mat Clamp Script

…if I knew how to write one I would. Unfortunately I don’t. Does anyone know how to write one so that all mats in a scene set to 255 move down one value??? And out of curiousity, how long would something like that take to script up?

You want it to always monitor it or just run it every now and then :wink:

probably be safer just making it into a button controlled from the utilities panel. :smile:

I’ll see if I can get it added to my bitmap cropping script this weekend, I think it will be useful.

had something similar.. quick edit, so it will probably scream on objects that don’t have a material.. but cheers. :wink:

works on current objects selected


objs = selection as array
for i=1 to objs.count do
(
	if (objs[i].material.diffuse.v == 255) do
	(
		tmpColor = objs[i].material.diffuse
		tmpColor.v = 254
		objs[i].material.diffuse = tmpColor
		strTmp = "Obj: " + (objs[i].name as string) + 
			" --- Mat: " + (objs[i].material.name as string) + 
			" --- DiffuseColor: " + (objs[i].material.diffuse as string)
		print strTmp
	)
)

it will probably scream on objects that don’t have a material

what?

Anyhow, thanks Dave! You are the script master. Unfortunately I’m a scriptkiddie virgin and have no clue how to even begin to use what you wrote.

learning every day :slight_smile: and so far from master its not even funny

..but thanks :wink:

Is this issue about not using 255 still relevant to the beta builds or just 1.09…

all builds

Hmmm. I’m beginning to wonder if Chaos tackled to fog issue in the .13 build…

They better have not, took me over an hour to write the clamping script :stuck_out_tongue: :lol:

Hey Eric, did you ever post that clamping script? I thought you did, but couldn’t find it anywhere.

Yep, check here: http://www.chaoticdimension.com/forums/phpBB2/viewtopic.php?t=10602&highlight=clamping