PRIM TYPE SCULPT/ja

From Second Life Wiki
< PRIM TYPE SCULPT
Revision as of 23:23, 2 July 2008 by Asuka Neely (talk | contribs) (New page: <onlyinclude>{{#if: {{#vardefine:type_sculpt_const|{{LSL Const/ja|PRIM_TYPE_SCULPT|integer|7|c=PRIM_TYPEのパラメータは、スカルプティへプリムを生成するのと、形...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

解説

定数: 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 プリムの インベントリ の中にあるtextureまたは UUID
• integer type PRIM_SCULPT_TYPE_* フラグ

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

type フラグ 形状 説明
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 でない場合、またはこれがtextureでない場合、エラーが DEBUG_CHANNEL 上で叫ばれます。
  • mapUUID である場合、オブジェクト自体に新たな アセット権限 が発生するようなことはありません。
    • アセットをプリムのインベントリの中に置いた場合、これまで発生していた使用制限は新しいオブジェクトで新たに作成されません。
JIRA で関連バグを検索する

関連記事

定数

•  PRIM_TYPE
•  CHANGED_SHAPE

関数

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams

イベント

•  changed

サンプル

<lsl>llSetPrimitiveParams([PRIM_TYPE,

                       PRIM_TYPE_SCULPT, 
                           "d962089b-2197-993c-9ec9-4993eb0a95f2",  // sculpty texture
                           PRIM_SCULPT_TYPE_SPHERE                  // type
                     ]);</lsl>

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

}</lsl>

<lsl>//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.

}</lsl>

特記事項

この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)