Shape

Object Hierarchy | 関連する C++クラス:CShape

導入

v7.0

詳細

Shape クラスは、パーティクルレンダリングのプリミティブタイプを表します。Shape オブジェクトは読み取り専用で、ICEAttribute.DataArrayなどのICEAttributeプロパティを使用してアクセスできます。

メソッド

IsEqual      
       

プロパティ

BranchSelected ReferenceID Type  
       

Python の例

#

# This example shows how to access the shape attribute data on a point cloud geometry.

#

from win32com.client import constants

xsi = Application

xsi.NewScene( )

# Create a graph test

grid = xsi.CreatePrim("Grid", "PointCloud", "", "")

xsi.ApplyOp("ICETree", "grid", "siNode", "", "", 0)

xsi.AddICENode("SetData", "grid.pointcloud.ICETree")

xsi.SetValue("grid.pointcloud.ICETree.SetData.PredefinedAttributeName", "Shape", "")

xsi.AddAttributeToSetDataICENode("grid.pointcloud.ICETree.SetData", "Shape", 32768, "siComponentDataContextComponent0D", "siComponentDataStructureSingle")

xsi.SetValue("grid.pointcloud.ICETree.SetData.shape", 5, "")

xsi.ConnectICENodes("grid.pointcloud.ICETree.port1", "grid.pointcloud.ICETree.SetData.set")

xsi.AddICENode("InstanceShapeNode.Preset", "grid.pointcloud.ICETree")

xsi.GetPresetModel("Man_Face", "Man_Face", "", "Face_Maker")

xsi.SetValue("grid.pointcloud.ICETree.ShapeInstancingNode.HierarchyMode", 1, "")

xsi.SetValue("grid.pointcloud.ICETree.ShapeInstancingNode.Reference", "Man_Face.Basic_Face", "")

xsi.ConnectICENodes("grid.pointcloud.ICETree.SetData.shape", "grid.pointcloud.ICETree.ShapeInstancingNode.shape")

# Iterate over the shape data

attrs = grid.ActivePrimitive2.Geometry.ICEAttributes;

for attr in attrs:

	xsi.LogMessage( "***********************************************************" )

	xsi.LogMessage( "Name: " + attr.Name )

	xsi.LogMessage( "DataType: " + str(attr.DataType) )

	xsi.LogMessage( "StructType: " + str(attr.StructureType) )

	xsi.LogMessage( "ContextType: " + str(attr.ContextType) )

	xsi.LogMessage( "IsDefined: " + str(attr.IsDefined) )	

	xsi.LogMessage( "IsConstant: " + str(attr.IsConstant) )	

	xsi.LogMessage( "Readonly: " + str(attr.IsReadonly) )

	xsi.LogMessage( "Category: " + str(attr.AttributeCategory) )

	xsi.LogMessage( "Element count: " + str(attr.ElementCount) )	

	if attr.IsDefined == 0:

		continue

	dataType = attr.DataType;

	data = attr.DataArray;

	for elem in data:

		if dataType == constants.siICENodeDataShape:

			xsi.LogMessage( "Shape Type:" + str(elem.Type) + ", Reference ID:" + str(elem.ReferenceID) + ", Branch selected:" + str(elem.BranchSelected) )

関連項目

Geometry.ICEAttributes ProjectItem.ICEAttributes