SHARE
TWEET

Find non-fullperm textures

RiverFromSL Sep 14th, 2019 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Checks a linkset for non-fullperm textures.
  2. // Cycles through each object in the linkset, and each face on each object
  3. // and reports if it can't access the UUID of the texture on that face
  4. // (this is a sign that it's not full-perm)
  5. //
  6. // River (riverborn resident) November 2018
  7.  
  8. checkAllTextures()
  9. {
  10.     integer link = 0;
  11.     integer face = 0;
  12.    
  13.     integer max_links = llGetNumberOfPrims();
  14.     llSay(0, "Starting object texture check...");
  15.     for (link = 1; link <= max_links; link++)
  16.     {
  17.         string desc = "Link " + (string)link + " (" + llGetLinkName(link) + "), ";
  18.  
  19.         integer max_faces = llGetLinkNumberOfSides(link);
  20.         for (face = 0; face < max_faces; face++)
  21.         {
  22.             list p = llGetLinkPrimitiveParams(link, [PRIM_TEXTURE, face]);
  23.             key diff = llList2Key(p, 0);
  24.             if (diff) {}
  25.             else llSay(0, desc + "face " + (string)face + ": CHECK TEXTURE");  
  26.         }
  27.     }
  28.  
  29.     llSay(0, "Check completed. Removing Script.");
  30.     llRemoveInventory(llGetScriptName());
  31. }
  32.  
  33. default
  34. {
  35.     state_entry()
  36.     {
  37.         checkAllTextures();
  38.     }
  39.    
  40.     touch_start(integer num)
  41.     {
  42.         checkAllTextures();
  43.     }
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top