Query | Description Alternate Function Call | Return Value(s) | Example Query Example Result |
PRIM_BUMP_SHINY, integer face | bumpmap and shininess of a face | integer shiny, integer bump (PRIM_SHINY_* and PRIM_BUMP_*) | [PRIM_BUMP_SHINY, 2] [2, 0] |
PRIM_COLOR, integer face | color and alpha of a face llGetColor, llGetAlpha | vector color, float alpha | [PRIM_COLOR, 1] [<0.000000, 0.250980, 1.000000>, 1.000000] |
PRIM_FLEXIBLE | flexible properties of the prim | integer TRUE/FALSE, integer softness, float gravity, float friction, float wind, float tension, vector force | [PRIM_FLEXIBLE] [1, 3, 0.300000, 2.000000, 0.000000, 1.000000, <0.000000, 0.000000, 0.000000>] |
PRIM_FULLBRIGHT, integer face | full bright attibute | integer TRUE/FALSE | [PRIM_FULLBRIGHT, 1] [1] |
PRIM_GLOW, integer face | amount of glow on face | float intensity | [PRIM_GLOW, ALL_SIDES] [0.03] |
PRIM_MATERIAL | material of the prim | integer material (PRIM_MATERIAL_*) | [PRIM_MATERIAL] [3] |
PRIM_PHANTOM | phantom property of the object llGetStatus | integer phantom (TRUE/FALSE) | [PRIM_PHANTOM] [0] |
PRIM_PHYSICS | physics property of the object llGetStatus | integer physics (TRUE/FALSE) | [PRIM_PHYSICS] [0] |
PRIM_POINT_LIGHT | light properties of the object | integer (TRUE/FALSE), vector color, float intensity, float radius, float falloff | [PRIM_POINT_LIGHT] [1, <1.000000, 1.000000, 1.000000>, 1.000000, 10.000000, 0.750000] |
PRIM_POSITION | position of the object llGetPos | vector position | [PRIM_POSITION] [<166.558548, 113.733795, 22.803015>] |
PRIM_ROTATION | rotation of the object llGetRot | rotation rot | [PRIM_ROTATION] [<0.000000, 0.000000, 0.000000, 1.000000>] |
PRIM_SIZE | scale of the object llGetScale | vector size | [PRIM_SIZE] [<0.500000, 0.500000, 0.500000>] |
PRIM_TEMP_ON_REZ | temporary on rez property of the object | integer temponrez (TRUE/FALSE) | [PRIM_TEMP_ON_REZ] [1] |
PRIM_TYPE | basic prim type | integer primtype, ... these parameters vary with primtype, see PRIM_TYPE table at llSetPrimitiveParams | [PRIM_TYPE] [2, 0, <0.000000, 1.000000, 0.000000>, 0.000000, <0.000000, 0.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, <0.000000, 0.000000, 0.000000>] |
PRIM_TEXGEN, integer face | texture mapping mode | integer texgen (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) | [PRIM_TEXGEN, 4] [1] |
PRIM_TEXTURE, integer face | texture properties of a face llGetTexture, llGetTextureScale, llGetTextureOffset, llGetTextureRot | ( string name OR key uuid ), vector repeats, vector offsets, float rotation (in radians) | [PRIM_TEXTURE, 2] ["Steel Plate", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000] |
// note that it will not show the actual constants, but instead their values [FALSE, // not phantom // next the type of prim and the hole shape, as well as the parameters: // vector cut, float hollow, vector twist, vector topsize, vector topshear PRIM_TYPE_PRISM, PRIM_HOLE_DEFAULT, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>, <0.000000, 0.250980, 1.000000>, 1.000000, // pairs of: vector color, float alpha <0.000000, 0.250980, 1.000000>, 1.000000, // one for each side of the prim <0.000000, 0.250980, 1.000000>, 1.000000, // because the query had ALL_SIDES as face <0.000000, 0.250980, 1.000000>, 1.000000, <0.000000, 0.250980, 1.000000>, 1.000000]
// get the prim type and everything that defines its form, except the scale list params = llGetPrimitiveParams([PRIM_TYPE]); // use this to restore the prim type and form (except scale) llSetPrimitiveParams([PRIM_TYPE] + params);
list GetPrimitiveParams(list input) { list output; integer c = (output != input);//same as -llGetListLength(input); if(c) { list t = output; list special = [PRIM_BUMP_SHINY, PRIM_COLOR, PRIM_TEXTURE, PRIM_FULLBRIGHT, PRIM_TEXGEN]; do { integer flag = llList2Integer(input, c); //peak the stack if(~llListFindList(special, [flag])) { if(++c)//adjust stack position, make sure it's valid. { integer side = llList2Integer(input, c); //peak the stack if(side == ALL_SIDES) { side = llGetNumberOfSides(); do output += t + llGetPrimitiveParams(t = [flag, --side]); while(side); //we return the sides in reverse order, easier to code; runs faster. } else output += t + llGetPrimitiveParams(t = [flag, side]); jump test;//by using a jump here we speed the code up a bit. } llOwnerSay("malformed input"); jump end; }//else //not needed because of jumps. output += flag + llGetPrimitiveParams([flag]); @test; }while(++c);//adjust stack position, make sure it's valid. } @end; return output; }//Writen by Strife Onizuka