Results 1 to 6 of 6

Thread: Modifing texture parameters using LScript

  1. #1
    Newbie Member
    Join Date
    Feb 2003
    Location
    Geneva
    Posts
    62

    Modifing texture parameters using LScript

    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

    Julius
    http://www.colonia-ostiensis.com
    MSN Messenger: [email protected]

  2. #2
    Registered User
    Join Date
    Feb 2003
    Location
    Helsinki, Finland
    Posts
    67
    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 ,-)

    main
    {
    Object = Mesh();
    ObjectSurfaces = (Surface(Object));
    CurSurf = Surface(ObjectSurfaces[1]);
    info(CurSurf.getValue(SURFCOLR));
    }


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

  3. #3
    Code:
    generic
    {
    	reqbegin("Random Color");
    
    	c1 = ctlstring("Surface Prefix","RandSurf_");
    
    	return if(!reqpost());
    
    	surfName = getvalue(c1);
    
    	reqend();
    
    	m = Scene().firstSelect();
    	if(m.genus != MESH)
    		error("Select a mesh.");
    	so = Surface(m);
    	foreach(s,so)
    	{
    		found = searchExp(s,surfName);
    		if(!found)
    			continue;
    
    		a = random(0,255) / 255;
    		b = random(0,255) / 255;
    		c = random(0,255) / 255;
    		string("Surf_SetSurf ",s," ",m.name);
    		CommandInput(this);
    		string("Surf_SetColor BaseColor ",a," ",b," ",c);
    		CommandInput(this);
    	}
    }
    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.
    "The hardness of God is kinder than the softness of men, and His compulsion is our liberation." - C.S. Lewis


  4. #4
    Originally posted by Halsu


    ...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".
    "The hardness of God is kinder than the softness of men, and His compulsion is our liberation." - C.S. Lewis


  5. #5
    Newbie Member
    Join Date
    Feb 2003
    Location
    Geneva
    Posts
    62

    Modifing texture parameters using LScript

    WOW!!!!
    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

    Julius
    http://www.colonia-ostiensis.com
    MSN Messenger: [email protected]

  6. #6
    Registered User
    Join Date
    Feb 2003
    Location
    Helsinki, Finland
    Posts
    67
    Thanks for the info!!
    CU
    --
    Eki

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •