G2A Many GEOs
SHARE
TWEET

Untitled

a guest Apr 6th, 2020 203 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. scanTextures()
  2. {
  3.     integer inventoryCount = llGetInventoryNumber(INVENTORY_TEXTURE);
  4.     integer parmCount;
  5.     integer n;
  6.     string  texture;
  7.     string  textureFullName;
  8.     vector  scale;
  9.     vector  offset;
  10.     float   rot;
  11.     list    parms;
  12.  
  13.     gInsideTextures = [];
  14.     gOutsideTextures = [];
  15.     gGlassTextures = [];
  16.     gOtherTextures = [];
  17.  
  18.     for (n=0; n < inventoryCount; n++) {
  19.         textureFullName = llGetInventoryName(INVENTORY_TEXTURE, n);
  20.         parms = (parms = []) + llParseString2List(textureFullName, [";"], []);
  21.         parmCount = (parms != []);   // Hack to get list length efficiently
  22.  
  23.         texture = llToLower(llStringTrim(llList2String(parms, 0), STRING_TRIM));
  24.  
  25.         if (parmCount > 1)
  26.             scale = (vector)llList2String(parms, 1);
  27.         else
  28.             scale = <1.0, 1.0, 1.0>;
  29.  
  30.         if (parmCount > 2)
  31.             offset = (vector)llList2String(parms, 2);
  32.         else
  33.             offset = ZERO_VECTOR;
  34.  
  35.         if (parmCount > 3)
  36.             rot = llList2Float(parms, 3);
  37.         else
  38.             rot = 0.0;
  39.  
  40.         if (texture == "inside") {
  41.             gInsideTextures += [textureFullName, scale, offset, rot];
  42.  
  43.         } else if (texture == "outside") {
  44.                 gOutsideTextures += [textureFullName, scale, offset, rot];
  45.  
  46.         } else if (texture == "glass") {
  47.                 gGlassTextures += [textureFullName, scale, offset, rot];
  48.  
  49.         } else {
  50.                 gOtherTextures += [textureFullName, scale, offset, rot];
  51.  
  52.         }
  53.     }
  54. }
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
Top