Rotation (Particle)
Description
Returns or sets the particle's orientation as an SIVector3.
C# Syntax
// get accessor Object rtn = Particle.Rotation; // set accessor Particle.Rotation = Object;
Examples
VBScript Example
' ' This example demonstrates how to read and write the rotation of legacy particles ' NewScene , false CreateParticleCloud , "Disc" ' Set up the particles to use a sprite shader displaying the noIcon.pic graphic SetValue "PEmitter.PEmitter_emission.Rate", 10 SetValue "ParTypes.PType.Size", 2 SICreateImageClip XSIUtils.BuildPath( _ Application.InstallationPath(siFactoryPath), _ "Application", "rsrc", "noIcon.pic") SetValue "ParTypes.PType.sprite_imagename", "Clips.noIcon_pic" CreateShaderFromPreset "Shaders\Texture\Particle_Old\Particle_Sprite.Preset", _ "Sources.Materials.DefaultLib.Material" SIConnectShaderToCnxPoint "Sources.Materials.DefaultLib.Material.Particle_Sprite", _ "ParTypes.PType.Particle_Billboard.Particle_Shape.Input" ' Go to frame 11 (to emit enough particles to be able to demonstrate the changes) SetValue "PlayControl.Current", 11 ' Find the cloud object under the Scene_Root set oCloud = Application.ActiveSceneRoot.Children("cloud") ' Set all particles to this rotation set v1 = XSIMath.CreateVector3( 1.5, 2.0, 1.0 ) for i=0 to oCloud.Particles.Count - 1 set myParticle = oCloud.Particles(i) myParticle.Rotation = v1 Application.LogMessage "Rotation.x: " & myParticle.Rotation.X Application.LogMessage "Rotation.y: " & myParticle.Rotation.Y Application.LogMessage "Rotation.z: " & myParticle.Rotation.Z next ' Expected results: ' INFO : Rotation.x: 1.5 ' INFO : Rotation.y: 2 ' INFO : Rotation.z: 1 ' INFO : Rotation.x: 1.5 ' INFO : Rotation.y: 2 ' INFO : Rotation.z: 1 ' INFO : Rotation.x: 1.5 ' INFO : Rotation.y: 2 ' INFO : Rotation.z: 1 ' INFO : Rotation.x: 1.5 ' INFO : Rotation.y: 2 ' INFO : Rotation.z: 1
Autodesk Softimage v7.5