v1.0
Filters a list of property sets to produce a list that includes or excludes all the property sets complying with a specified parent-child relationship.
oReturn = FilterPSet( [InputObjs], [Relationship], [Include] ); |
Returns an XSICollection object that contains the filtered list.
Parameter | Type | Description |
---|---|---|
InputObjs | String |
List of property sets. Default Value: Current selection |
Relationship | siPSetRelationship |
Relationship to filter on. Default Value: siContainedPSet |
Include | Boolean |
True to include (False to exclude) property sets that match the relationship. Default Value: True |
' 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." |
' 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" |