也是帮网友写的。不过最后没用上。哈哈。

targetPF = $

startTime = AnimationRange.Start.Frame
endTime = AnimationRange.End.Frame

particlesCount = targetPF.numParticlesGenerated() 

particleMeshs = #()
particleMeshs[particlesCount] = undefined




for timeIndex = startTime to endTime do
(
    SliderTime = timeIndex
    for particID = 1 to particlesCount do
    (
        targetPF.particleID = particID
        if targetPF.particleShape != undefined  then
        (
            if particleMeshs[particID] == undefined do
            (
                particleMeshs[particID] = Editable_Mesh()
                particleMeshs[particID].mesh = targetPF.particleShape
                particleMeshs[particID].name = Uniquename "ParticleFlowCollapse"
                with animate on
                (
                    for tt = startTime to timeIndex do 
                    at time tt
                    (
                        zeroMatrix = matrix3 0
                        zeroMatrix.Position = targetPF.particleTM.Position
                        particleMeshs[particID].transform = zeroMatrix
                    )
                )
            )
            with animate on
            (
                particleMeshs[particID].transform = targetPF.particleTM
            )
        )
        else
        (
            if particleMeshs[particID] != undefined do 
            (
                with animate on
                (
                    zeroMatrix = particleMeshs[particID].transform
                    zeroMatrix.scale = [0,0,0]
                    particleMeshs[particID].transform = zeroMatrix
                )
            )
        )
    )
)

 

相关文章:

  • 2021-08-17
  • 2021-09-11
  • 2022-01-30
  • 2022-12-23
  • 2021-12-27
  • 2021-05-16
  • 2021-09-30
  • 2021-04-15
猜你喜欢
  • 2021-11-04
  • 2022-12-23
  • 2021-08-19
  • 2022-02-10
  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案