Color (Particle)
Description
Returns or sets the particle's Color. The color is normalized, with each component in the range 0 to 1.
C# Syntax
// get accessor Color rtn = Particle.Color; // set accessor Particle.Color = Color;
Examples
VBScript Example
' ' Example showing how to create a ' neatly ordered particle cloud with the particle ' colors changing across the x axis ' NewScene , false set ParTypeCol = CreateParticleType set oRoot = ActiveProject.ActiveScene.Root set oParticleCloud = oRoot.AddParticleCloud( ParTypeCol , "MyCloud" ) set oParticleCloudPrim = oParticleCloud.ActivePrimitive oParticleCloudPrim.AddParticles 1000 , ParTypeCol(0) Set oParticleCollection = oParticleCloudPrim.Particles set oPos = XSIMath.CreateVector3() for i = 0 to 9 for j = 0 to 9 for k = o to 9 set oParticle = oParticleCollection( i*100 + j*10 + k ) oPos.X = -5 + i oPos.Y = -3 + j oPos.Z = k oParticle.Position = oPos oParticle.Size = 0.8 set oColor = oParticle.Color oColor.Red = i/10 oColor.Green = i/10 oColor.Blue = i/10 oColor.Alpha = 0.7 oParticle.Color = oColor next next next
Autodesk Softimage v7.5