AttributeType (ParticleAttribute)
Description
Returns the attribute type as one of the siParticleAttributeType enum values.
C# Syntax
// get accessor siParticleAttributeType rtn = ParticleAttribute.AttributeType;
Examples
VBScript Example
' ' This example demonstrates how to work with ParticleAttribute objects. In particular, it shows ' how to access goal information (which is a kind of ParticleAttribute) in a particle event script ' NewScene ,false ' Note: Since the CreateParticleCloud command returns the newly created ParticleCloud wrapped in ' an XSICollection, we can get a pointer to the new cloud by extracting just the first member set myParticleCloud = CreateParticleCloud()(0) set myParticleEmitter = ActiveSceneRoot.AddGeometry( "Sphere","MeshSurface", "ParticleEmitter" ) AddParticleEmitter myParticleCloud, myParticleEmitter set myParticleGoal = ActiveSceneRoot.AddGeometry( "Sphere", "MeshSurface", "ParticleGoal" ) myParticleGoal.posx = 10.0 myParticleGoal.posy = 15.0 ' Note: The AddParticleGoal command uses an input/output type of parameter to specify which ' particle cloud object to use. Unfortunately, if you pass the actual ParticleCloud object ' for this parameter, the command will convert it to an XSICollection again, so avoid this ' by passing in only the name (SIObject.Name property) of the ParticleCloud object AddParticleGoal myParticleCloud.Name, myParticleGoal set myParticleCloudPrimitive = myParticleCloud.ActivePrimitive set oEventColl = AddParticleEvent( myParticleCloudPrimitive.ParticleTypes(0))(0) ' Converting the event collection into a Property set oEvent = oEventColl(0) oEvent.Parameters("EventAction").value = 6 ' script oEvent.EventTrigger.Value = 3 ' Every NFrame oEvent.TriggerValue.Value = 50 ' Every 50 frames oEvent.ScriptContext.Value = 1 ' Per particle oEvent.Script.Value = "for each oAttr in inParticle.Attributes " & vbCrLf & "" & vbTab & _ "Application.LogMessage ""Attribute Name: "" & oAttr.Name" & vbCrLf & "" & vbTab & _ "Application.LogMessage ""Attribute Type: "" & oAttr.AttributeType" & vbCrLf & "" & vbTab & _ "Application.LogMessage ""Attribute Value: "" & Typename(oAttr.Value)" & vbCrLf & "next" PlayForwardsFromStart ' Output of the above script: 'INFO : Attribute Name: Goal_0_UVWI 'INFO : Attribute Type: 0 'INFO : Attribute Value: ISIQuaternion 'INFO : Attribute Name: Goal_0_Offset 'INFO : Attribute Type: 1 'INFO : Attribute Value: ISIVector3 'INFO : Attribute Name: Goal_0_Weight 'INFO : Attribute Type: 2 'INFO : Attribute Value: Single ' ... 'INFO : Attribute Name: Goal_0_UVWI 'INFO : Attribute Type: 0 'INFO : Attribute Value: ISIQuaternion 'INFO : Attribute Name: Goal_0_Offset 'INFO : Attribute Type: 1 'INFO : Attribute Value: ISIVector3 'INFO : Attribute Name: Goal_0_Weight 'INFO : Attribute Type: 2 'INFO : Attribute Value: Single
Autodesk Softimage v7.5