> // Get valid models
> var oModels = FindKind( "Character" );
>
> // Test if valid models were found.
> if( oModels.count > 0 )
> {
> // Create collection to store valid meshes under valid models
> var oMeshes = XSIFactory.CreateObject( "XSI.Collection" );
>
> // Collect polygon meshes under valid models
> for( var e = new Enumerator( oModels ); !e.atEnd(); e.moveNext() )
> {
> oMeshes.additems( e.item().findchildren( "", siPolyMeshType, null, true ) );
> }
>
> // Test if polygon meshes were found, if so, select them
> if( oMeshes.count > 0 )
> {
> selectobj( oMeshes );
> }
> }
>
>
>
> function FindKind( sKind )
> {
> // Create collection to store valid models
> var oAllModels = XSIFactory.CreateObject( "XSI.Collection" );
>
> // Iterate all models
> for( var oAllModelsEnum = new Enumerator( activesceneroot.models );
> !oAllModelsEnum.atEnd(); oAllModelsEnum.moveNext() )
> {
> var oCpset = oAllModelsEnum.item().properties( sKind );
> if( oCpset )
> {
> oAllModels.add( oAllModelsEnum.item() );
> }
> }
>
> return( oAllModels );
> }
>
>
>
>
> > PS : Sorry for the bad formatting in the script. I must instal firefox on my
> > laptop someday. IE is not very friendly with Gmail :-/
>
> That has nothing to do with IE. Firefox also mangles the code formatting.
[ Bernard ] Well, sometimes ;-)
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi