Don't click here unless you want to be banned.

LSL Wiki : llGetPrimitiveParams

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
list llGetPrimitiveParams(list params)

Returns primitive parameters specified in the params list.

The resulting list can then be used for parameters of llSetPrimitiveParams (but not without modification since the list is missing the parameters - you have to build a new list based on the params list and your own knowledge of how many arguments each parameter has). A function at the bottom of the page encapsulates llGetPrimitiveParams so that the output can be directly used with llSetPrimitiveParams.



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]
PRIM_GLOW, integer face amount of glow on face float intensity [PRIM_GLOW, ALL_SIDES]
PRIM_MATERIAL material of the prim integer material (PRIM_MATERIAL_*) [PRIM_MATERIAL]
PRIM_PHANTOM phantom property of the object
integer phantom (TRUE/FALSE) [PRIM_PHANTOM]
PRIM_PHYSICS physics property of the object
integer physics (TRUE/FALSE) [PRIM_PHYSICS]
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
vector position [PRIM_POSITION]
[<166.558548, 113.733795, 22.803015>]
PRIM_ROTATION rotation of the object
rotation rot [PRIM_ROTATION]
[<0.000000, 0.000000, 0.000000, 1.000000>]
PRIM_SIZE scale of the object
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]
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]
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]

Refer to llSetPrimitiveParams for information about PRIM_SHINY_*, PRIM_BUMP_* and PRIM_MATERIAL_*.

// 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);

Encapsulated (the ouput can be used as the input of llSetPrimitiveParams):
list GetPrimitiveParams(list input)
    list output;
    integer c = (output != input);//same as -llGetListLength(input);
        list t = output;
            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();
                            output += t + llGetPrimitiveParams(t = [flag, --side]);
                        while(side); //we return the sides in reverse order, easier to code; runs faster.
                        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]);
        }while(++c);//adjust stack position, make sure it's valid.
    return output;
}//Writen by Strife Onizuka

This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Prim | Parameter | Jasa SEO Murah Jasa SEO Jasa Google Adwords Jasa Adwords Google Adwords Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Govr Edo Ziedo Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Penumbuh Rambut Kursus SEO Jam Tangan Casio Grosir Baju Bisnis Online Kerupuk Kulit Social Bookmark Kumpulan Puisi WBC Wonogiri Penumbuh Rambut Jam Tangan Murah Jam Tangan Murah Jam Tangan Casio Penumbuh Rambut Kerupuk Kulit Alat Kantor Belanja Online Grosir Eceran Murah dan Aman Jasa SEO Model Jilbab Fine Tableware Permanent Hair Removal island investment development professional makeup artist bali private villa sewa mobil jakarta murah Jual rumah Jakarta Contact Lens Technology
There are 5 comments on this page. [Display comments/form]