Determine if a child is a prim, sculpt, or mesh

Soen Eber

Vatican mole
VVO Supporter 🍦🎈👾❤
Joined
Sep 20, 2018
Messages
3,995
Not originally mine, source: How to tell a mesh from a sculpt from a prim - Kitely Forums
Code:
string prim_class(integer ln)
{
    string class;
    list l = llGetLinkPrimitiveParams(ln, [PRIM_TYPE]);
    if (llList2Integer(l,0) == PRIM_TYPE_SCULPT) {
        if (llList2Integer(l,2) == PRIM_SCULPT_TYPE_MESH) {
            class = "mesh";
        }
        else {
            class = "sculpt";
        }
    }
    else class = "prim";
    return class;
}
 
Last edited:
  • 1Like
Reactions: Kokoro Fasching