Finding all Store in Channel shaders


// Get all shaders
var x = FindObjects(null, "{6495C5C1-FD18-474E-9703-AEA66631F7A7}" );
LogMessage( x.Count );
var oShaderCollection = new ActiveXObject( "XSI.Collection" );

// Build up a collection of all Store in Channel shaders
oEnum = new Enumerator( x ) ;
for (;!oEnum.atEnd();oEnum.moveNext() )
{
	var oShader = oEnum.item() ;
	try {
		//LogMessage( oShader.ProgID );
		if ( oShader.ProgID.indexOf( "_storeinchannel" ) > 0 )
		{
			oShaderCollection.Add( oShader );
		}

	}
	catch(e)
	{
		LogMessage(e.message);
	}
}


LogMessage( oShaderCollection.Count );

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s