Notifications
Clear all

[Closed] particleflow script trouble or something?

Hey guys,
I’ve confused with following test_script,It’s a standard flow loop ,when loop 100 times ,my pc calculates it 8 seconds,and 200 times is 80 seconds not 16 seconds, when loop 1000 times my pc like frozen.
Maybe there is a way to avoid time waste,but I can’t only monkeyed around.
Who can help,thanks!

tstart = timestamp()
for i=1 to 100 do 
(pfSource = PF_Source()
pfSource.SetPViewLocation -22 -5
particleFlow.BeginEdit()
op1 = Birth()
op2 = Position_Icon()
op3 = Speed()
op4 = Rotation()
op5 = ShapeLibrary()
op6 = RenderParticles()
op7 = DisplayParticles()
op7.color = pfSource.wireColor
ev1 = Event()
ev1.SetPViewLocation -22 95
particleFlow.EndEdit()
ev1.AppendAction op1
ev1.AppendAction op2
ev1.AppendAction op3
ev1.AppendAction op4
ev1.AppendAction op5
ev1.AppendAction op7
pfSource.AppendAction op6
pfSource.AppendInitialActionList ev1)

tend = timestamp()
print ("done: finished. Total time: " +  ((tend-tstart)/1000.0) as string + "s")
3 Replies

I believe this case is something like http://forums.cgsociety.org/showthread.php?f=98&t=922140&highlight=Fast+attach+algorithm

but where is the key to open it?
confused loooong time!

check my changes and get right performance

It works,denisT!
:bounce::applause:=#(“thanks”)
:bounce:=“very much”
append :bounce: :applause: :bounce: –for Dr denisT who directed me from confusion!