日々適当

hibitekitou

(メモ)ポリゴンメッシュの頂点にヌルを配置

xsi |2004-11-25
よくわからないので、これでとりあえず我慢…
XSI 4.0にて検証。

Dim oRoot, oObj, oGeometory, oNull, i

i = 1
DeselectAll

'作成するヌルは Null at Vertex ってモデルに格納
CreateModel
SetValue "Model.Name", "Null at Vertex"

set oRoot = Application.ActiveProject.ActiveScene.Root

'対象オブジェクトをピックする。
PickElement "PolygonMesh","Select Objct","Select Objct", oObj, button

if button <> 0 then

set oGeometry = oObj.ActivePrimitive.Geometry

'ピックしたオブジェクトの頂点にヌルを配置
for each oPoint in oGeometry.Points
set oNull = oRoot.AddNull("Null"& i)

setValue oNull &".kine.global.posx" , oPoint.Position.x
setValue oNull &".kine.global.posy" , oPoint.Position.y
setValue oNull &".kine.global.posz" , oPoint.Position.z

CopyPaste oNull, , "Null_at_Vartex", 1

i = i + 1
next

end if
コメント ( 0 )|Trackback ( )
  ・