ConstructionHistory.Filter

ConstructionHistory.Filter

説明

指定された基準に一致するOperatorオブジェクトのコレクションを戻します。

C#構文

OperatorCollection ConstructionHistory.Filter( String in_filter, Object in_famArray, String in_path );

スクリプト構文

oReturn = ConstructionHistory.Filter( [Type], [Family], [Path] );

戻り値

OperatorCollection

パラメータ

パラメータ タイプ 説明
Type String twistop などのオペレータタイプ(使用可能なオペレータのリストについては、Operator Informationを参照)
Family siFamily フィルタリングするファミリ名(たとえば、デフォームオペレータファミリの場合は"siDeformOperatorFamily"を使用)
Pass String Object List文字列表現によるオブジェクト名(たとえば、"twist*"と指定すると、すべての twist オペレータが戻されます)

VBScript の例

' The following code illustrates how to get a ConstructionHistory, 

' filter the construction history for DeformOperators and then iterate 

' the converters using the For Each...Next statement: 

Dim oGPig

' See if there are any DeformOperators now

Set oGPig = ActiveSceneRoot.AddGeometry( "Torus", "MeshSurface" )

ShowTransforms oGPig 

' Apply a Bend Operator and then see

ApplyOp "bend", oGPig

ShowTransforms oGPig 

' Apply a Twist Operator and then see

ApplyOp "twist", oGPig

ShowTransforms oGPig 

Function ShowTransforms( in_object )

	Dim oStack, oTransform, sMemberList 

	Set oStack = in_object.ActivePrimitive.ConstructionHistory.Filter( , siDeformOperatorFamily )

	If oStack.Count > 0 Then

		For Each oTransform In oStack

			sMemberList = sMemberList & oTransform.Name & ", "

		Next

		sMemberList = Left( sMemberList, ( Len( sMemberList ) - 2 ) )

	Else

		sMemberList = "(none found)"

	End If

	LogMessage sMemberList

	ShowConstructionHistory = sMemberList

End Function

' Output of above script:

'INFO : "(none found)"

'INFO : "Bend Op"

'INFO : "Twist Op, Bend Op"