Code:
int $index = particleShape1.collisionGeometryIndex;
if( $index != -1 )
{
string $geoC[] = `listConnections particleShape1.collisionGeometry[$index]`;
string $shape[] = `listConnections ( $geoC[0] + ".localGeometry" )`;
if ($shape[0] == "cube_A")
{
particleShape1.rgbPP = <<1,0,0>>;
}
if ($shape[0] == "cube_B")
{
particleShape1.lifespanPP=0;
}
}