RemoveAttribute (ParticleType)
Description
Removes a user-defined attribute from this particle type by specifying the name.
Scripting Syntax
ParticleType.RemoveAttribute( name )
C# Syntax
ParticleType.RemoveAttribute( String in_strName );
Parameters
|
Parameter |
Type |
Description |
|
name |
Name of the defined attribute. |
Examples
JScript Example
NewScene( null, false );
var oParticleType = CreateParticleType()(0);
oParticleType.AddAttribute( "ZetaFactor", siPAVector3 );
//Oh no I meant MyZetaFactor
oParticleType.RemoveAttribute( "ZetaFactor" );
oParticleType.AddAttribute( "MyZetaFactor", siPAVector3 );
PrintParticleTypeUserAttributes( oParticleType );
function PrintParticleTypeUserAttributes( in_ParticleType )
{
var aNames = in_ParticleType.AttributeNames().toArray();
for ( var i=0; i<aNames.length; i++ ) {
Application.LogMessage( aNames[i] );
var str = "This attribute type is ";
switch ( in_ParticleType.AttributeType(aNames[i]) ) {
case siPAVector4 :
str += "siPAVector4";
break;
case siPAVector3 :
str += "siPAVector3";
break;
case siPAFloat :
str += "siPAFloat";
break;
case siPAInt :
str += "siPAInt";
break;
case siPAULong :
str += "siPAULong";
break;
case siPAUShort:
str += "siPAUShort";
break;
case siPABool :
str += "siPABool";
}
Application.LogMessage( str );
}
}
// Expected results:
//INFO : MyZetaFactor
//INFO : This attribute type is siPAVector3
See Also
SOFTIMAGE|XSI v6.01