|
![](/i/fill.gif) |
This method shaved off about 5% overall time when I ran a test of 1000
entries with minimal scenes..
#declare Start_Frame = 0;
#declare End_Frame = 999;
#if (clock = Start_Frame)
// read in values
#local A_Value = 0;
#declare BigArray = array[(End_Frame+1)-Start_Frame];
#fopen FileHandle1 "vals_test.txt" read
#local Count = 0;
#while (Count<=End_Frame)
#read (FileHandle1,A_Value)
#declare BigArray[Count] = A_Value;
#local Count = Count + 1;
#end
#fclose FileHandle1
// write an inc file
#fopen FileHandle2 "vals_test.inc" write
#local Count = 0;
#write (FileHandle2,"#switch (clock)\n")
#while (Count<=End_Frame)
#write (FileHandle2,concat (" #case (",str(Count,2,0),")\n") )
#write (FileHandle2,concat (" #declare
List_Value=",str(BigArray[Count],2,2)";\n") )
#write (FileHandle2," #break\n")
#local Count = Count + 1;
#end
#write (FileHandle2,"#end\n")
#fclose FileHandle2
#end
#include "vals_test.inc"
Post a reply to this message
|
![](/i/fill.gif) |