PRIM TYPE SCULPT/ja

From Second Life Wiki

メインページ > PRIM TYPE SCULPT > PRIM TYPE SCULPT/ja
Jump to: navigation, search

Contents

解説

定数: integer PRIM_TYPE_SCULPT = 7;

integerの定数PRIM_TYPE_SCULPTは7の値をもちます。

PRIM_TYPE_SCULPTは、指定の形状と型のスカルプティでプリムを生成するのに用いるPRIM_TYPEのパラメータです。
Sculpted Prims: FAQ

PRIM_TYPE

[ PRIM_TYPE, PRIM_TYPE_SCULPT, string map, integer type ]
• string map a プリムのインベントリにあるtextureあるいはUUID
• integer type PRIM_SCULPT_TYPE_* フラグ

llSetPrimitiveParamsllSetLinkPrimitiveParamsを実行するために用います。

typeフラグ Style 解説
PRIM_SCULPT_TYPE_SPHERE 1 上と下が交わっていて、左から右に閉じています。
PRIM_SCULPT_TYPE_TORUS 2 ローラス 上と下に閉じていて、左側から右側に閉じています。
PRIM_SCULPT_TYPE_PLANE 3 平面 交わりも、閉じてもいません
PRIM_SCULPT_TYPE_CYLINDER 4 シリンダー 左側から右側に閉じています。
PRIM_SCULPT_FLAG_ZZZZZZZZ 63
PRIM_SCULPT_FLAG_INVERT 64 反転 あべこべに表示します(通常の反転)。
PRIM_SCULPT_FLAG_MIRROR 128 反射 スカルプティのX軸を反射して表示します。

注意

  • プリムのインベントリからmapが無い場合、 かつ、 UUIDで指定されていない場合、 あるいは、a textureでない場合、エラーが上でshoutされます。
  • mapUUID で指定した場合、オブジェクトに asset permissionsが追加されずに済みます。
    • プリムのインベントリに内に置いた場合、その使用制限が当該オブジェクトにも引き継がれてしまいます

関連項目

定数

• integer PRIM_TYPE
•  CHANGED_SHAPE

関数

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams

イベント

•  changed

llSetPrimitiveParams([PRIM_TYPE, 
                        PRIM_TYPE_SCULPT, 
                            "d962089b-2197-993c-9ec9-4993eb0a95f2",  // sculpty texture
                            PRIM_SCULPT_TYPE_SPHERE                  // type
                      ]);

//Rotates between the different sculpt types.
default
{
    touch_start(integer a)
    {
        list b = llGetPrimitiveParams([PRIM_TYPE]);
        integer type = llList2Integer(b,2) % 4;
        llSetObjectDesc(llList2String([ "Sphere",
                                        "Torus",
                                        "Plane",
                                        "Cylinder"], type));
        llSetPrimitiveParams(PRIM_TYPE + llList2List(b, 0, 1) + (type + 1));
    }
}

//A simple script to setup a prim as a sculpty.
default
{
    state_entry()
    {
        llSetPrimitiveParams([
            PRIM_TYPE, PRIM_TYPE_SCULPT, "your Sculpt map name in the object", PRIM_SCULPT_TYPE_SPHERE
          , PRIM_TEXTURE, ALL_SIDES, "your texture name in the object", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0 //comment out if not needed.
//          , PRIM_SIZE, <0.63,0.199,0.52> // If you need to change the scale (size) of the object, uncomment this line.
        ]);
    } // The grey color you see on your sculpt object is the SL no found texture that is grey.
}
Personal tools
In other languages