FilterPSet

導入

v1.0

カテゴリ

property

詳細

プロパティ セットのリストをフィルタ処理して、指定の親-子関係に適合するすべてのプロパティを含むリスト、または除外したリストを作成します。

スクリプト構文

oReturn = FilterPSet( [InputObjs], [Relationship], [Include] );

戻り値

フィルタリングされたリストを含む XSICollection オブジェクトを戻します。

パラメータ

パラメータ タイプ 詳細
InputObjs 文字列 プロパティ セットのリスト

デフォルト値: 現在選択されている値

Relationship siPSetRelationship フィルタリングする関係

デフォルト値: siContainedPSet

Include ブール 関係に適合するプロパティ セットを含める場合には True(除外する場合には False)

デフォルト値: True

1. VBScript の例

' create objects for example
CreatePrim "Cone", "MeshSurface"
' test the pset relationship of visibility, display and material properties
set psets = FilterPSet( "Camera_Interest.visibility", siLocalPSet, True )
if TypeName( psets ) <> "Nothing" then
        LogMessage "Camera_Interest.visibility property is local."
else
        LogMessage "Camera_Interest.visibility property is shared."
end if
set psets = FilterPSet( "Camera_Interest.display", siSharedPSet, True )
if TypeName( psets ) <> "Nothing" then
        LogMessage "Camera_Interest.display property is shared."
else
        LogMessage "Camera_Interest.display property is local."
end if
set psets = FilterPSet( "cone.Scene_Material", siSharedPSet, True )
if TypeName( psets ) <> "Nothing" then
        LogMessage "cone.Scene_Material is inherited."
else
        LogMessage "cone.Scene_Material is local."
end if 
'INFO : "Camera_Interest.visibility property is local."
'INFO : "Camera_Interest.display property is shared."
'INFO : "cone.Scene_Material is inherited."

2. VBScript の例

' Is the camera interest display property a local property set of its parent?
set l_PSets = FilterPSet( "Camera_Interest.display", siLocalPSet )
if TypeName( l_PSets ) <> "Nothing" then
LogMessage "Camera_Interest.display is a local property set."
else
LogMessage "Camera_Interest.display is an inherited property set."
end if
'--------------------------------------
' The following message will be logged:
'    'INFO : "Camera_Interest.display is an inherited property set."
' Create a cone and select its material.
set MyCone = CreatePrim( "Cone", "MeshSurface" )
SelectObj MyCone.Material
' Is the selected cone material an inherited property set?
set l_PSets = FilterPSet( , siSharedPSet )
if TypeName( l_PSets ) <> "Nothing" then
LogMessage "The cone material is an inherited property set."
else
LogMessage "The cone material is a local property set."
end if
'--------------------------------------
' The following message will be logged:
'    'INFO : "The cone material is an inherited property set."
' Create a grid.
CreatePrim "Grid", "MeshSurface"
' List all the inherited property sets of the grid.
set l_PSets = FilterPSet( "grid.*", siSharedPset )
if TypeName( l_PSets ) <> "Nothing" then
        LogMessage "Inherited property sets of the grid:"
        for each p in l_Psets
                LogMessage "   " & p.name
        next
else
        LogMessage "No shared PSets"
end if
'--------------------------------------
' The following message will be logged:
'    'INFO : "Inherited property sets of the grid:"
'    'INFO : "   Ambient Lighting"
'    'INFO : "   Scene_Material"
'    'INFO : "   Geometry Approximation"
'    'INFO : "   Display"

関連項目

MakeLocal