AttributeNames (ParticleType)

Description

Returns an array containing the names of all user-defined attributes for this particle type.

C# Syntax

Object ParticleType.AttributeNames();

Return Value

Array

Examples

Python Example

from win32com.client import constants as c

def PrintParticleTypeUserAttributes( in_ParticleType ) :
   for aName in in_ParticleType.AttributeNames() :
       Application.LogMessage( aName )
       attrType = in_ParticleType.AttributeType(aName)
       str = "This attribute type is "
       if attrType == c.siPAVector4 :
          str += "siPAVector4"
       elif c.siPAVector3 : 
          str += "siPAVector3" 
       elif c.siPAFloat : 
          str += "siPAFloat"
       elif c.siPAInt : 
          str += "siPAInt"
       elif c.siPAULong : 
          str += "siPAULong"
       elif c.siPAUShort: 
          str += "siPAUShort"
       elif c.siPABool : 
          str += "siPABool"
       Application.LogMessage( str )

Application.NewScene( "", 0 )
oParticleType = Application.CreateParticleType()(0)

oParticleType.AddAttribute( "ZetaFactor", c.siPAVector3 )
#Oh no I meant MyZetaFactor
oParticleType.RemoveAttribute( "ZetaFactor" )
oParticleType.AddAttribute( "MyZetaFactor", c.siPAVector3 )

PrintParticleTypeUserAttributes( oParticleType )


# Expected results:
#INFO : MyZetaFactor
#INFO : This attribute type is siPAVector3


Autodesk Softimage v7.5