Quote:
Originally Posted by davidhorman
In fact, consider using expr to create a 1-pixel high sliding bar clip and then pointresize it up to full height.
|
I'll admit I've never used expr and I haven't the foggiest idea how to create that 1-pixel high sliding bar clip with it.
My original idea of replacing the for loops didn't work. Well, I should clarify that... I was able to replace the two for loops with ScriptClip + ConditionalReader (the core piece), but it seems that the use of ScriptClip + ConditionalReader multiple times in a script with the same variable names doesn't work as expected so a loop of multiple instance fails. That would only have ~109 splices instead of 103848 (presumably not crashing).
For example:
Code:
LEN=103848
mini_length=956
Asrc=BlankClip(Length=LEN, height=786, width=1920, Pixel_type="YV12",COLOR=$FF0000).ShowFrameNumber
Bsrc=BlankClip(Length=LEN, height=786, width=1920, Pixel_type="YV12",COLOR=$00FF00).ShowFrameNumber
Loop_cnt=0
A=Asrc.trim(Loop_cnt*mini_length, ((Loop_cnt+1)*mini_length-1))
B=Bsrc.trim(Loop_cnt*mini_length, ((Loop_cnt+1)*mini_length-1))
ScriptClip(A, """
stackhorizontal(stackhorizontal(A.crop(0,0,n,-0),B.crop(n,0,960,-0)),A.crop(960+n,0,-0,-0))
""")
ConditionalReader("slide.txt", "n", false)
Y = last
Loop_cnt = Loop_cnt + 1
A=Asrc.trim(Loop_cnt*mini_length, ((Loop_cnt+1)*mini_length-1))
B=Bsrc.trim(Loop_cnt*mini_length, ((Loop_cnt+1)*mini_length-1))
ScriptClip(A, """
stackhorizontal(stackhorizontal(A.crop(0,0,n,-0),B.crop(n,0,960,-0)),A.crop(960+n,0,-0,-0))
""")
ConditionalReader("slide.txt", "n", false)
Z = last
return Y
#return Z
I don't understand why Y and Z are identical. If either of the two code blocks are commented out Y/Z are what is expected, or if the variable names in each block are unique (like A0, B0 in the first and A1, B1 in the second) Y & Z are what is expected. But with limitation I can't use a for or while loop to do this 109 times or even do a manual unroll with copy and paste without making every iteration unique.
slide.txt:
Code:
Type int
0 2
1 4
2 6
3 8
4 10
5 12
6 14
7 16
8 18
9 20
10 22
11 24
12 26
13 28
14 30
15 32
16 34
17 36
18 38
19 40
20 42
21 44
22 46
23 48
24 50
25 52
26 54
27 56
28 58
29 60
30 62
31 64
32 66
33 68
34 70
35 72
36 74
37 76
38 78
39 80
40 82
41 84
42 86
43 88
44 90
45 92
46 94
47 96
48 98
49 100
50 102
51 104
52 106
53 108
54 110
55 112
56 114
57 116
58 118
59 120
60 122
61 124
62 126
63 128
64 130
65 132
66 134
67 136
68 138
69 140
70 142
71 144
72 146
73 148
74 150
75 152
76 154
77 156
78 158
79 160
80 162
81 164
82 166
83 168
84 170
85 172
86 174
87 176
88 178
89 180
90 182
91 184
92 186
93 188
94 190
95 192
96 194
97 196
98 198
99 200
100 202
101 204
102 206
103 208
104 210
105 212
106 214
107 216
108 218
109 220
110 222
111 224
112 226
113 228
114 230
115 232
116 234
117 236
118 238
119 240
120 242
121 244
122 246
123 248
124 250
125 252
126 254
127 256
128 258
129 260
130 262
131 264
132 266
133 268
134 270
135 272
136 274
137 276
138 278
139 280
140 282
141 284
142 286
143 288
144 290
145 292
146 294
147 296
148 298
149 300
150 302
151 304
152 306
153 308
154 310
155 312
156 314
157 316
158 318
159 320
160 322
161 324
162 326
163 328
164 330
165 332
166 334
167 336
168 338
169 340
170 342
171 344
172 346
173 348
174 350
175 352
176 354
177 356
178 358
179 360
180 362
181 364
182 366
183 368
184 370
185 372
186 374
187 376
188 378
189 380
190 382
191 384
192 386
193 388
194 390
195 392
196 394
197 396
198 398
199 400
200 402
201 404
202 406
203 408
204 410
205 412
206 414
207 416
208 418
209 420
210 422
211 424
212 426
213 428
214 430
215 432
216 434
217 436
218 438
219 440
220 442
221 444
222 446
223 448
224 450
225 452
226 454
227 456
228 458
229 460
230 462
231 464
232 466
233 468
234 470
235 472
236 474
237 476
238 478
239 480
240 482
241 484
242 486
243 488
244 490
245 492
246 494
247 496
248 498
249 500
250 502
251 504
252 506
253 508
254 510
255 512
256 514
257 516
258 518
259 520
260 522
261 524
262 526
263 528
264 530
265 532
266 534
267 536
268 538
269 540
270 542
271 544
272 546
273 548
274 550
275 552
276 554
277 556
278 558
279 560
280 562
281 564
282 566
283 568
284 570
285 572
286 574
287 576
288 578
289 580
290 582
291 584
292 586
293 588
294 590
295 592
296 594
297 596
298 598
299 600
300 602
301 604
302 606
303 608
304 610
305 612
306 614
307 616
308 618
309 620
310 622
311 624
312 626
313 628
314 630
315 632
316 634
317 636
318 638
319 640
320 642
321 644
322 646
323 648
324 650
325 652
326 654
327 656
328 658
329 660
330 662
331 664
332 666
333 668
334 670
335 672
336 674
337 676
338 678
339 680
340 682
341 684
342 686
343 688
344 690
345 692
346 694
347 696
348 698
349 700
350 702
351 704
352 706
353 708
354 710
355 712
356 714
357 716
358 718
359 720
360 722
361 724
362 726
363 728
364 730
365 732
366 734
367 736
368 738
369 740
370 742
371 744
372 746
373 748
374 750
375 752
376 754
377 756
378 758
379 760
380 762
381 764
382 766
383 768
384 770
385 772
386 774
387 776
388 778
389 780
390 782
391 784
392 786
393 788
394 790
395 792
396 794
397 796
398 798
399 800
400 802
401 804
402 806
403 808
404 810
405 812
406 814
407 816
408 818
409 820
410 822
411 824
412 826
413 828
414 830
415 832
416 834
417 836
418 838
419 840
420 842
421 844
422 846
423 848
424 850
425 852
426 854
427 856
428 858
429 860
430 862
431 864
432 866
433 868
434 870
435 872
436 874
437 876
438 878
439 880
440 882
441 884
442 886
443 888
444 890
445 892
446 894
447 896
448 898
449 900
450 902
451 904
452 906
453 908
454 910
455 912
456 914
457 916
458 918
459 920
460 922
461 924
462 926
463 928
464 930
465 932
466 934
467 936
468 938
469 940
470 942
471 944
472 946
473 948
474 950
475 952
476 954
477 956
478 958
479 956
480 954
481 952
482 950
483 948
484 946
485 944
486 942
487 940
488 938
489 936
490 934
491 932
492 930
493 928
494 926
495 924
496 922
497 920
498 918
499 916
500 914
501 912
502 910
503 908
504 906
505 904
506 902
507 900
508 898
509 896
510 894
511 892
512 890
513 888
514 886
515 884
516 882
517 880
518 878
519 876
520 874
521 872
522 870
523 868
524 866
525 864
526 862
527 860
528 858
529 856
530 854
531 852
532 850
533 848
534 846
535 844
536 842
537 840
538 838
539 836
540 834
541 832
542 830
543 828
544 826
545 824
546 822
547 820
548 818
549 816
550 814
551 812
552 810
553 808
554 806
555 804
556 802
557 800
558 798
559 796
560 794
561 792
562 790
563 788
564 786
565 784
566 782
567 780
568 778
569 776
570 774
571 772
572 770
573 768
574 766
575 764
576 762
577 760
578 758
579 756
580 754
581 752
582 750
583 748
584 746
585 744
586 742
587 740
588 738
589 736
590 734
591 732
592 730
593 728
594 726
595 724
596 722
597 720
598 718
599 716
600 714
601 712
602 710
603 708
604 706
605 704
606 702
607 700
608 698
609 696
610 694
611 692
612 690
613 688
614 686
615 684
616 682
617 680
618 678
619 676
620 674
621 672
622 670
623 668
624 666
625 664
626 662
627 660
628 658
629 656
630 654
631 652
632 650
633 648
634 646
635 644
636 642
637 640
638 638
639 636
640 634
641 632
642 630
643 628
644 626
645 624
646 622
647 620
648 618
649 616
650 614
651 612
652 610
653 608
654 606
655 604
656 602
657 600
658 598
659 596
660 594
661 592
662 590
663 588
664 586
665 584
666 582
667 580
668 578
669 576
670 574
671 572
672 570
673 568
674 566
675 564
676 562
677 560
678 558
679 556
680 554
681 552
682 550
683 548
684 546
685 544
686 542
687 540
688 538
689 536
690 534
691 532
692 530
693 528
694 526
695 524
696 522
697 520
698 518
699 516
700 514
701 512
702 510
703 508
704 506
705 504
706 502
707 500
708 498
709 496
710 494
711 492
712 490
713 488
714 486
715 484
716 482
717 480
718 478
719 476
720 474
721 472
722 470
723 468
724 466
725 464
726 462
727 460
728 458
729 456
730 454
731 452
732 450
733 448
734 446
735 444
736 442
737 440
738 438
739 436
740 434
741 432
742 430
743 428
744 426
745 424
746 422
747 420
748 418
749 416
750 414
751 412
752 410
753 408
754 406
755 404
756 402
757 400
758 398
759 396
760 394
761 392
762 390
763 388
764 386
765 384
766 382
767 380
768 378
769 376
770 374
771 372
772 370
773 368
774 366
775 364
776 362
777 360
778 358
779 356
780 354
781 352
782 350
783 348
784 346
785 344
786 342
787 340
788 338
789 336
790 334
791 332
792 330
793 328
794 326
795 324
796 322
797 320
798 318
799 316
800 314
801 312
802 310
803 308
804 306
805 304
806 302
807 300
808 298
809 296
810 294
811 292
812 290
813 288
814 286
815 284
816 282
817 280
818 278
819 276
820 274
821 272
822 270
823 268
824 266
825 264
826 262
827 260
828 258
829 256
830 254
831 252
832 250
833 248
834 246
835 244
836 242
837 240
838 238
839 236
840 234
841 232
842 230
843 228
844 226
845 224
846 222
847 220
848 218
849 216
850 214
851 212
852 210
853 208
854 206
855 204
856 202
857 200
858 198
859 196
860 194
861 192
862 190
863 188
864 186
865 184
866 182
867 180
868 178
869 176
870 174
871 172
872 170
873 168
874 166
875 164
876 162
877 160
878 158
879 156
880 154
881 152
882 150
883 148
884 146
885 144
886 142
887 140
888 138
889 136
890 134
891 132
892 130
893 128
894 126
895 124
896 122
897 120
898 118
899 116
900 114
901 112
902 110
903 108
904 106
905 104
906 102
907 100
908 98
909 96
910 94
911 92
912 90
913 88
914 86
915 84
916 82
917 80
918 78
919 76
920 74
921 72
922 70
923 68
924 66
925 64
926 62
927 60
928 58
929 56
930 54
931 52
932 50
933 48
934 46
935 44
936 42
937 40
938 38
939 36
940 34
941 32
942 30
943 28
944 26
945 24
946 22
947 20
948 18
949 16
950 14
951 12
952 10
953 8
954 6
955 4