ParticleAttribute

Object Hierarchy | Related C++ Class: ParticleAttribute

Inheritance

SIObject
  ParticleAttribute

Introduced

4.0

Description

Represents a user defined Particle attribute, which is a custom parameter for particles originating from a ParticleType.

Methods

IsClassOf

IsEqualTo

Properties

Application

AttributeType

Categories

FullName

Help

Name

NestedObjects

Origin

OriginPath

Parent

Type

Value

Examples

VBScript Example

'
' This example demonstrates how to create a user defined particle attribute on a ParticleType
' and access its value within a particle cloud
'
NewScene , false

' Create a new particle type (CreateParticleType always returns an XSICollection of types)
set oParticleType = CreateParticleType()(0)

' Define a custom attribute on the new particle type
oParticleType.AddAttribute "ZetaFactor", siPAVector3

' Set up a particle cloud and add some particles using the new type
set oParticleCloud = ActiveSceneRoot.AddParticleCloud( oParticleType , "MyCloud" )
set oParticleCloudPrim = oParticleCloud.ActivePrimitive
oParticleCloudPrim.AddParticles 10 , oParticleType
set oParticleCollection = oParticleCloudPrim.Particles

' Vector object that we use to fill in the x,y,z positions
set pos = XSIMath.CreateVector3

' Set the ParticleAttribute value
for i = 0 to 9 
   set oParticle = oParticleCollection(i)
   pos.x = -5 + i
   pos.y = -3 + i
   pos.z = i
   oParticle.Attributes("ZetaFactor").Value = pos
next

' Retrieve the ParticleAttribute value and print it
for i = 0 to 9
   set oParticle = oParticleCollection(i)
   set oVector3 = oParticle.Attributes("ZetaFactor").Value
   Application.LogMessage oVector3.x & " " & oVector3.y & " " & oVector3.z
next

See Also

Particle

ParticleType

ParticleAttributeCollection

ParticleType.AddAttribute

Particle.Attributes

 

 

 



SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index