v4.0
Returns a collection of Parameter objects containing all parameters
tagged by the specified tag. This function can return local as well as nested parameters.
The tagging system helps you set a collection of parameters. Tags are persisted
with a scene, so you never lose them. You can use this method to get a set of parameters
in order to pass it to a command.
Note: Because this method returns all tagged parameters for the object and its children,
use this method carefully on models (such as the scene root).
ParameterCollection ProjectItem.TaggedParameters( siTags, Boolean ); |
oReturn = ProjectItem.TaggedParameters( [Tag], [Local] ); |
Parameter | Type | Description |
---|---|---|
Tag | siTags |
The tags to look for. This can be a combination of tags. When a parameter
supports at least one of the tags specified in an argument, it is added to
the return list.
Default Value: siTagAll |
Local | Boolean |
Specifies whether the tag to check is local to the object or not. If
true then all tagged parameters that come from propagated properties or
from intermediate nodes are ignored (referenced parameters). Intermediate
nodes are nested under the object but are not necessary owned by the object
itself. For instance, the camera object nested under a Texture_Projection_Def
property is not considered unless the target object is the projection
property itself. When the argument is set to false (default), all parameters
are considered.
Default Value: False |
CreatePrim( "Cone", "MeshSurface" ); var oGeom = GetValue( "Cone.polymsh.geom" ); var oParam1 = oGeom.Parameters("subdivu"); var oParam2 = oGeom.Parameters("subdivv"); var oObj = GetValue( "Cone" ); // Set the Tags oParam1.Tags = siTag2 + siTag6; oParam2.Tags = siTag6; // Get the parameters with siTag2 (subdivu) Application.LogMessage( "tag2 parameters with local flag on:" ) var oList = oObj.TaggedParameters( siTag2, true ); // Nothing will be displayed because we checked only the cone object for ( i=0; i<oList.Count; i++ ) { Application.LogMessage( oList.Item(i) ); } // Get the parameters with siTag2 (subdivu) Application.LogMessage( "tag2 parameters with local flag off:" ) var oList = oObj.TaggedParameters( siTag2, false ); for ( i=0; i<oList.Count; i++ ) { Application.LogMessage( oList.Item(i) ); } // Now get the parameters with siTag6 (subdivu and subdivv) Application.LogMessage( "tag6 parameters with local flag off:" ) var oList = oGeom.TaggedParameters( siTag6, false ); for ( i=0; i<oList.Count; i++ ) { Application.LogMessage( oList.Item(i) ); } // Remove all tags oParam1.Tags = siTagNone oParam2.Tags = siTagNone |