Modifing texture parameters using LScript

Julius Caesar

New member
Hello all,
I am wondering if anyone knows how to change texture parameters in Modeler like Color, Image, Diffusion, Bump and other values etc using LWScript. I would like to create a script that changes these values on several models/object using a LW Script.
I know that it did exist a Include for the LW 5.5.. Do we have something for the 7.5?
Thank you and best regards



New member
I'd like to see an answer to this too...

I tried to search the docs about these, but haven't found anything smart yet.

I now know how to READ the values though ,-)

Object = Mesh();
ObjectSurfaces = (Surface(Object));
CurSurf = Surface(ObjectSurfaces[1]);

...and while at it, is there a way to make UVmaps with LScript ?
	reqbegin("Random Color");

	c1 = ctlstring("Surface Prefix","RandSurf_");

	return if(!reqpost());

	surfName = getvalue(c1);


	m = Scene().firstSelect();
	if(m.genus != MESH)
		error("Select a mesh.");
	so = Surface(m);
		found = searchExp(s,surfName);

		a = random(0,255) / 255;
		b = random(0,255) / 255;
		c = random(0,255) / 255;
		string("Surf_SetSurf ",s," ",;
		string("Surf_SetColor BaseColor ",a," ",b," ",c);

this is part of the RandomColorGN script i made. you cannot change surface parameters within modeler (sucks, eh?) so you have to go to layout for that. you will have to use CS commands to do so. do not run the script, because it is lacking a search and replace UDF. just pick out what you need from there.

good luck.
Halsu said:

...and while at it, is there a way to make UVmaps with LScript ?

yes.. it's still under the Vertex Maps Object agent. UV vmaps two float slots. check the docs at the chapter called "Vertex Map Object Agent".

Julius Caesar

New member
Thank you very much for your script, Faulknermano!!!!
That opens new possibility for my work!!!!! I really appreciated the script you posted.... I will definitively use that ***very*** soon... I will, of course, put a REM in the script with a credit for you!!!

Best regards

Top Bottom