-
Notifications
You must be signed in to change notification settings - Fork 1
/
c64dvd-b.bas
4117 lines (3971 loc) · 209 KB
/
c64dvd-b.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
' c64.bas
#ifdef _DEBUG
# define dprint(msg) open err for output as #99:print #99,"debug: " & msg:close #99
#else
# define dprint(msg) :
#endif
static shared as double prompt
static shared as longint mx, my, mb
static shared as string material, texture, shape, lamp, objtype
static shared as string shader, node,ntype, ninput, noutput, modifier
static shared as string cmd, getstr, msg, itype, otype, modtype
static shared as ulong mr, offset,sys_offset=&HC000
static shared as any ptr image
type MEMORY_T
public:
declare constructor
declare destructor
declare function ReadByte (byval adr as ulongint) as byte
declare function ReadUByte (byval adr as ulongint) as ubyte
declare function ReadUShort (byval adr as ulongint) as ushort
declare sub WriteByte (byval adr as ulongint, byval b8 as ulongint)
declare sub WriteUByte (byval adr as ulongint, byval b8 as ulongint)
declare sub WriteUShort(byval adr as ulongint, byval w16 as ulongint)
declare function Peek64(byval adr as ulongint) as ulongint
declare sub poke64(byval adr as ulongint, byval v as ulongint)
#if 0
const as ulongint os_end = &HFFFF '------|
const as ulongint os_base = &HE000 ' 8 K | KERNAL ROM or RAM (adr 0 bit1=0 RAM bit1=1 ROM
const as ulongint flopy_end = &HDFFF '------+-|
const as ulongint flopy_base = &HDF00 ' 256 b |
const as ulongint cpm_end = &HDEFF '--------|
const as ulongint cpm_base = &HDE00 ' 256 b |
const as ulongint cia2_end = &HDDFF '--------|
const as ulongint cia2_base = &HDD00 ' 256 b |
const as ulongint cia1_end = &HDCFF '--------|
const as ulongint cia1_base = &HDC00 ' 256 b |-- 4 K I/O
const as ulongint col_end = &HDBFF '--------|
const as ulongint col_base = &HD800 ' 1 K |
const as ulongint sid_end = &HD7FF '--------|
const as ulongint sid_base = &HD400 ' 1 K |
const as ulongint vic_end = &HD3FF '--------|
const as ulongint vic_base = &HD000 ' 1 K |
const as ulongint up_ram_end = &HCFFF '------+-|
const as ulongint up_ram_base= &HC000 ' 4 K |
const as ulongint basic_end = &HBFFF '------|
const as ulongint basic_base = &HA000 ' 8 K
#endif
as double mem64 (&HFFFE) ' Ram
as double kernal(&H1FFF) ' OS
as double basic (&H1FFF) ' Basic
as double char (&H07FF) ' Font
as double col (&H03E7) ' color triples
end type
enum ADR_MODES
_UNK ' unknow
_IMP ' instruction only
_IMM ' 1 byte operand (immidate)
' opr = mem(pc)
_ABS ' 2 byte lo hi
' adr = mem(pc) + mem(pc+1)*256
_ZERO ' 1 byte lo (zero page hi=0)
' adr = mem(pc) and 255
_ZEROX ' 1 byte lo (zero page x hi=0)
' adr = (mem(pc)+x) and 255
_ZEROY ' 1 byte lo (zero page y hi=0)
' adr = (mem(pc)+y) and 255
_ABSX ' 2 byte lo hi (abs x)
' adr = mem(pc ) + mem(pc+1)*256 + x
_ABSY ' 2 byte lo hi (abs y)
' adr = mem(pc ) + mem(pc+1)*256 + y
_REL ' 1 byte lo (rel. branch -128 - +127)
' adr= PC + lo
_INDX ' 1 byte lo (ind x)
' adr =(mem(pc )+x) and 255
' adr = mem(adr) + mem(adr+1)*256
_INDY ' 2 byte lo hi (ind y)
' adr = mem(pc ) + mem(pc +1)*256 + y
_IND ' 2 byte lo hi (jmp indirect)
' adr = mem(pc ) + mem(pc +1)*256
' pc = mem(adr) + mem(adr+1)*256
end enum
type FLAGS
as ulongint C:1
as ulongint Z:1
as ulongint I:1
as ulongint D:1
as ulongint B:1
as ulongint H:1
as ulongint V:1
as ulongint N:1
end type
type CPU6510_T as CPU6510 ptr
type MULTI
union
as ulongint u64
as ulongint s64
type
union
as ulong u32
as ulong s32
type
union
as ushort u16
as short s16
type
union
as ubyte ulo
as byte slo
end union
union
as ubyte uhi
as byte shi
end union
end type
end union
end type
end union
end type
end union
end type
type OPCODE
as ulongint code
as zstring * 4 nam
as longint adrmode,bytes,ticks
as MULTI op
as sub(byval Cpu as CPU6510_T) decode
end type
type CPU6510
public:
declare constructor(byval mem as MEMORY_T ptr)
declare destructor
declare operator CAST as string
declare function Tick(byval flg as ulongint=&HFFFFFFFFFFFFFFFF) as ulongint
declare function ADR_IMM as ulongint
declare function ADR_REL as ulongint
declare function ADR_ZERO as ulongint
declare function ADR_ZEROX as ulongint
declare function ADR_ZEROY as ulongint
declare function ADR_ABS as ulongint
declare function ADR_ABSX as ulongint
declare function ADR_ABSY as ulongint
declare function ADR_IND as ulongint
declare function ADR_INDX as ulongint
declare function ADR_INDY as ulongint
declare function ADR_UNK as ulongint ' unknow
declare sub Push (byval v as ulongint)
declare function Pull as ulongint
union ' status register P
as ubyte P
as FLAGS F
end union
union ' accumulator A
as ubyte A ' A unsigned
as byte sA ' A signed
end union
union ' index register X
as ubyte X ' X unsigned
as byte sX ' X signed
end union
union ' index register Y
as ubyte Y ' X unsigned
as byte sY ' X signed
end union
union ' program counter PC
as ushort PC
type
as ubyte PL ' as lo hi bytes
as ubyte PH
end type
end union
union ' stack pointer
as ushort SP
type
as ubyte S ' as lo bytes
as ubyte MSB ' msb allways hi
end type
end union
as MEMORY_T ptr mem
as OPCODE code
private:
as OPCODE Opcodes(255)
as string StrAdrModes(12)
end type
type C64_T
public:
declare constructor
declare destructor
as MEMORY_T ptr MEM
as CPU6510 ptr CPU
end type
COLOR_ROM:
data &H19191d,&Hfcfcf9,&H4c933a,&Hfab6fa
data &Hedd27d,&H6f6acf,&Hd84f44,&H8bfbfb
data &H5bd89c,&H077f53,&H9fef83,&H535757
data &Ha7a3a7,&Hbfb7fb,&Hffa397,&He7efe9
constructor C64_T
dim as integer i,c
dprint("C64_T()")
ScreenRes 800,600, 32', 0, 1: Cls
for i=0 to 15
read c:palette i,c
next
bload "background.bmp",0
mem=new MEMORY_T
cpu=new CPU6510(mem)
end constructor
destructor C64_T
delete CPU
delete MEM
dprint("C64_T~")
sleep 1000
end destructor
constructor MEMORY_T
dim as integer i
' init all ROM's
restore KERNAL_ROM
for i=0 to 8191:read kernal(i):next
restore BASIC_ROM
for i=0 to 8191:read basic(i):next
restore CHAR_ROM
for i=0 to 2047:read char(i):next
poke64(0,255):poke64(1,255)
' Set text color
poke64(sys_offset+2,&HFF) ' Red
poke64(sys_offset+3,&HFF) ' Greem
poke64(sys_offset+4,&HFF) ' Blue
poke64(sys_offset+5,&HFF) ' Alpha
poke64(53272,31) 'Sets screen memory to 1024
end constructor
destructor MEMORY_T
dprint("MEMORY_T~")
end destructor
static shared as C64_T computer
static shared as integer ticks
function MEMORY_T.Peek64(byval adr as ulongint) as ulongint
select case adr
case &HE000 to &HFFFF:return kernal(adr-&HE000)
case &HA000 to &HBFFF:return basic (adr-&HA000)
case &HD800 to &HDBFF:return char (adr-&HD800)
case &HD000 to &HD3FF
dim as integer reg=adr and &H003f
if reg=&H12 then return 0 else return &HFF
case else : return mem64(adr)
end select
end function
sub MEMORY_T.poke64(byval adr as ulongint,byval v as ulongint)
mem64(adr)=v
if adr>=&HD800 and adr<=&HDBFF then
adr-=&HD800:col(adr)=v
adr+=1024:v=mem64(adr)
end if
if adr = 53272 then
select case v
case 15: mem64(sys_offset+229) = 0
case 31: mem64(sys_offset+229) = 1024
case 47: mem64(sys_offset+229) = 2048
case 63: mem64(sys_offset+229) = 3072
case 79: mem64(sys_offset+229) = 4096
case 95: mem64(sys_offset+229) = 5120
case 111: mem64(sys_offset+229) = 6144
case 127: mem64(sys_offset+229) = 7168
case 143: mem64(sys_offset+229) = 8192
case 159: mem64(sys_offset+229) = 9216
case 175: mem64(sys_offset+229) = 10240
case 191: mem64(sys_offset+229) = 11264
case 207: mem64(sys_offset+229) = 12288
case 223: mem64(sys_offset+229) = 13312
case 239: mem64(sys_offset+229) = 14336
case 255: mem64(sys_offset+229) = 15360
end select
end if
select case adr
case sys_offset
shell "mplayer -vo xv -fs -alang en dvd://" + str(v) + " -dvd-device /dev/cd0"
case sys_offset+1
shell "mplayer -vo xv -fs dvdnav:// -mouse-movements -dvd-device /dev/cd0"
case sys_offset+2 ' Foreground Red
mem64(sys_offset+201) = rgba(mem64(sys_offset+2),mem64(sys_offset+3),_
mem64(sys_offset+4),mem64(sys_offset+5))
case sys_offset+3 ' Foreground Green
mem64(sys_offset+201) = rgba(mem64(sys_offset+2),mem64(sys_offset+3),_
mem64(sys_offset+4),mem64(sys_offset+5))
case sys_offset+4 ' Foreground Blue
mem64(sys_offset+201) = rgba(mem64(sys_offset+2),mem64(sys_offset+3),_
mem64(sys_offset+4),mem64(sys_offset+5))
case sys_offset+5 ' Foreground Alpha
mem64(sys_offset+201) = rgba(mem64(sys_offset+2),mem64(sys_offset+3),_
mem64(sys_offset+4),mem64(sys_offset+5))
case sys_offset+6 ' Background Red
mem64(sys_offset+202) = rgba(mem64(sys_offset+6),mem64(sys_offset+7),_
mem64(sys_offset+8),mem64(sys_offset+9))
case sys_offset+7 ' Background Green
mem64(sys_offset+202) = rgba(mem64(sys_offset+6),mem64(sys_offset+7),_
mem64(sys_offset+8),mem64(sys_offset+9))
case sys_offset+8 ' Background Blue
mem64(sys_offset+202) = rgba(mem64(sys_offset+6),mem64(sys_offset+7),_
mem64(sys_offset+8),mem64(sys_offset+9))
case sys_offset+9 ' Background Alapha
mem64(sys_offset+202) = rgba(mem64(sys_offset+6),mem64(sys_offset+7),_
mem64(sys_offset+8),mem64(sys_offset+9))
case sys_offset+10 'x0
mem64(sys_offset+203) = mem64(sys_offset+11) shl 32 + mem64(sys_offset+12) shl 24 +_
mem64(sys_offset+13) shl 16 + mem64(sys_offset+14) shl 08 +_
mem64(sys_offset+15)
case sys_offset+16 'y0
mem64(sys_offset+204) = mem64(sys_offset+17) shl 32 + mem64(sys_offset+18) shl 24 +_
mem64(sys_offset+19) shl 16 + mem64(sys_offset+20) shl 08 +_
mem64(sys_offset+21)
case sys_offset+22 'z0
mem64(sys_offset+205) = mem64(sys_offset+23) shl 32 + mem64(sys_offset+24) shl 24 +_
mem64(sys_offset+25) shl 16 + mem64(sys_offset+26) shl 08 +_
mem64(sys_offset+27)
case sys_offset+28 'x1
mem64(sys_offset+206) = mem64(sys_offset+29) shl 32 + mem64(sys_offset+30) shl 24 +_
mem64(sys_offset+31) shl 16 + mem64(sys_offset+32) shl 08 +_
mem64(sys_offset+33)
case sys_offset+34 'y1
mem64(sys_offset+207) = mem64(sys_offset+35) shl 32 + mem64(sys_offset+36) shl 24 +_
mem64(sys_offset+37) shl 16 + mem64(sys_offset+38) shl 08 +_
mem64(sys_offset+39)
case sys_offset+40 'z1
mem64(sys_offset+208) = mem64(sys_offset+41) shl 32 + mem64(sys_offset+42) shl 24 +_
mem64(sys_offset+43) shl 16 + mem64(sys_offset+44) shl 08 +_
mem64(sys_offset+45)
case sys_offset+46 'r0
mem64(sys_offset+209) = mem64(sys_offset+47) shl 32 + mem64(sys_offset+48) shl 24 +_
mem64(sys_offset+49) shl 16 + mem64(sys_offset+50) shl 08 +_
mem64(sys_offset+51)
case sys_offset+52 'r1
mem64(sys_offset+210) = mem64(sys_offset+53) shl 32 + mem64(sys_offset+54) shl 24 +_
mem64(sys_offset+55) shl 16 + mem64(sys_offset+56) shl 08 +_
mem64(sys_offset+57)
case sys_offset+58 'r2
mem64(sys_offset+211) = mem64(sys_offset+59) shl 32 + mem64(sys_offset+60) shl 24 +_
mem64(sys_offset+61) shl 16 + mem64(sys_offset+62) shl 08 +_
mem64(sys_offset+63)
case sys_offset+64 'r3
mem64(sys_offset+212) = mem64(sys_offset+65) shl 32 + mem64(sys_offset+66) shl 24 +_
mem64(sys_offset+67) shl 16 + mem64(sys_offset+68) shl 08 +_
mem64(sys_offset+69)
case sys_offset+70 'r4
mem64(sys_offset+213) = mem64(sys_offset+71) shl 32 + mem64(sys_offset+72) shl 24 +_
mem64(sys_offset+73) shl 16 + mem64(sys_offset+74) shl 08 +_
mem64(sys_offset+75)
case sys_offset+76 'r5
mem64(sys_offset+214) = mem64(sys_offset+77) shl 32 + mem64(sys_offset+78) shl 24 +_
mem64(sys_offset+79) shl 16 + mem64(sys_offset+80) shl 08 +_
mem64(sys_offset+81)
case sys_offset+82 'r6
mem64(sys_offset+215) = mem64(sys_offset+83) shl 32 + mem64(sys_offset+84) shl 24 +_
mem64(sys_offset+85) shl 16 + mem64(sys_offset+86) shl 08 +_
mem64(sys_offset+87)
case sys_offset+88 'r7
mem64(sys_offset+216) = mem64(sys_offset+89) shl 32 + mem64(sys_offset+90) shl 24 +_
mem64(sys_offset+91) shl 16 + mem64(sys_offset+92) shl 08 +_
mem64(sys_offset+93)
case sys_offset+94 'r8
mem64(sys_offset+217) = mem64(sys_offset+95) shl 32 + mem64(sys_offset+96) shl 24 +_
mem64(sys_offset+97) shl 16 + mem64(sys_offset+98) shl 08 +_
mem64(sys_offset+99)
case sys_offset+100 'r9
mem64(sys_offset+218) = mem64(sys_offset+101) shl 32 + mem64(sys_offset+102) shl 24 +_
mem64(sys_offset+103) shl 16 + mem64(sys_offset+104) shl 08 +_
mem64(sys_offset+105)
case sys_offset+106 'r10
mem64(sys_offset+219) = mem64(sys_offset+107) shl 32 + mem64(sys_offset+108) shl 24 +_
mem64(sys_offset+109) shl 16 + mem64(sys_offset+110) shl 08 +_
mem64(sys_offset+111)
case sys_offset+112 'r11
mem64(sys_offset+220) = mem64(sys_offset+113) shl 32 + mem64(sys_offset+114) shl 24 +_
mem64(sys_offset+115) shl 16 + mem64(sys_offset+116) shl 08 +_
mem64(sys_offset+117)
case sys_offset+118 'rot0
mem64(sys_offset+221) = mem64(sys_offset+119) shl 32 + mem64(sys_offset+120) shl 24 +_
mem64(sys_offset+121) shl 16 + mem64(sys_offset+122) shl 08 +_
mem64(sys_offset+123)
case sys_offset+124 'rot1
mem64(sys_offset+222) = mem64(sys_offset+125) shl 32 + mem64(sys_offset+126) shl 24 +_
mem64(sys_offset+127) shl 16 + mem64(sys_offset+128) shl 08 +_
mem64(sys_offset+129)
case sys_offset+130 'rot2
mem64(sys_offset+223) = mem64(sys_offset+131) shl 32 + mem64(sys_offset+132) shl 24 +_
mem64(sys_offset+133) shl 16 + mem64(sys_offset+134) shl 08 +_
mem64(sys_offset+135)
case sys_offset+136 'rot3
mem64(sys_offset+224) = mem64(sys_offset+137) shl 32 + mem64(sys_offset+138) shl 24 +_
mem64(sys_offset+139) shl 16 + mem64(sys_offset+140) shl 08 +_
mem64(sys_offset+141)
case sys_offset+142 'rot4
mem64(sys_offset+225) = mem64(sys_offset+143) shl 32 + mem64(sys_offset+144) shl 24 +_
mem64(sys_offset+145) shl 16 + mem64(sys_offset+146) shl 08 +_
mem64(sys_offset+147)
case sys_offset+148 'rot5
mem64(sys_offset+226) = mem64(sys_offset+149) shl 32 + mem64(sys_offset+150) shl 24 +_
mem64(sys_offset+151) shl 16 + mem64(sys_offset+152) shl 08 +_
mem64(sys_offset+153)
case sys_offset+154 'd0
mem64(sys_offset+227) = mem64(sys_offset+155) shl 32 + mem64(sys_offset+156) shl 24 +_
mem64(sys_offset+157) shl 16 + mem64(sys_offset+158) shl 08 +_
mem64(sys_offset+159)
case sys_offset+160 'd1
mem64(sys_offset+228) = mem64(sys_offset+161) shl 32 + mem64(sys_offset+162) shl 24 +_
mem64(sys_offset+163) shl 16 + mem64(sys_offset+164) shl 08 +_
mem64(sys_offset+165)
case sys_offset+166
pset (mem64(sys_offset+203),mem64(sys_offset+203)), mem64(sys_offset+201)
case sys_offset+167
line (mem64(sys_offset+203),mem64(sys_offset+203))-(mem64(sys_offset+206),mem64(sys_offset+207)), mem64(sys_offset+201)
case sys_offset+168
mr = GetMouse (mx, my, , mb)
if mb and 1 then poke64(sys_offset+168, 1) ' left
if mb and 2 then poke64(sys_offset+168, 2) ' right
if mb and 3 then poke64(sys_offset+168, 3) ' middle
WriteUShort(sys_offset+169, mx): WriteUShort(sys_offset+170, my)
case sys_offset+171 ' clear the screen
cls
case sys_offset+172 ' opens video device
open "tmp.py" for output as #1
print #1, "# Start of file"
print #1, "import bpy"
print #1, "bpy.context.scene.render.engine = 'CYCLES'"
print #1, "bpy.context.scene.render.resolution_x = 800"
print #1, "bpy.context.scene.render.resolution_y = 600"
print #1, "bpy.context.scene.render.resolution_percentage = 100"
print #1, "bpy.context.scene.render.image_settings.file_format = 'BMP'"
print #1, "bpy.data.scenes['Scene'].render.filepath = './" + _
str(mem64(sys_offset+180))+".bmp'"
case sys_offset+173 ' closes video device
print #1, "bpy.ops.render.render(use_viewport = True, write_still=True)"
print #1, "# End of file"
close #1
case sys_offset+174 ' Graphics Processing Unit - 1
select case v
case 0 'Objects - Mesh
select case mem64(sys_offset+200)
case 0: print #1, "bpy.ops.mesh.primitive_plane_add()"
case 1: print #1, "bpy.ops.mesh.primitive_cube_add()"
case 2: print #1, "bpy.ops.mesh.primitive_circle_add()"
case 3: print #1, "bpy.ops.mesh.primitive_uv_sphere_add()"
case 4: print #1, "bpy.ops.mesh.primitive_ico_sphere_add()"
case 5: print #1, "bpy.ops.mesh.primitive_cylinder_add()"
case 6: print #1, "bpy.ops.mesh.primitive_cone_add()"
case 7: print #1, "bpy.ops.mesh.primitive_torus_add()"
case 8: print #1, "bpy.ops.mesh.primitive_grid_add()"
case 9: print #1, "bpy.ops.mesh.primitive_monkey_add()"
end select
case 1 'Objects - Curve
select case mem64(sys_offset+200)
case 0: print #1, "bpy.ops.curve.primitive_bezier_curve_add()"
case 1: print #1, "bpy.ops.curve.primitive_bezier_circle_add()"
case 1: print #1, "bpy.ops.curve.primitive_nurbs_circle_add()"
case 2: print #1, "bpy.ops.curve.primitive_nurbs_curve_add()"
case 3: print #1, "bpy.ops.curve.primitive_nurbs_path_add()"
end select
case 2 'Objects - Lamp
select case mem64(sys_offset+200)
case 0: print #1, "bpy.ops.object.lamp_add(type='POINT')"
case 1: print #1, "bpy.ops.object.lamp_add(type='SUN')"
case 2: print #1, "bpy.ops.object.lamp_add(type='SPOT')"
case 3: print #1, "bpy.ops.object.lamp_add(type='HEMI')"
case 4: print #1, "bpy.ops.object.lamp_add(type='AREA')"
end select
case 3 'Objects - Other
select case mem64(sys_offset+200)
case 0: print #1, "bpy.ops.object.text_add()"
case 1: print #1, "bpy.ops.object.armature_add()"
case 2: print #1, "bpy.ops.object.add(type='LATTICE')"
case 3: print #1, "bpy.ops.object.add(type='MESH')"
case 4: print #1, "bpy.ops.object.add(type='CURVE')"
case 5: print #1, "bpy.ops.object.add(type='SURFACE')"
case 6: print #1, "bpy.ops.object.add(type='LATTICE')"
case 7: print #1, "bpy.data.window_managers["+chr(34)+_
" WinMan"+chr(34)+"].(null) = 'META'"
print #1, "bpy.ops.object.add(type='META')"
case 8: print #1, "bpy.data.window_managers["+chr(34)+_
" WinMan"+chr(34)+"].(null) = 'FONT'"
print #1, "bpy.ops.object.add(type='FONT')"
case 9: print #1, "bpy.ops.object.add(type='ARMATURE')"
case 10: print #1, "bpy.data.window_managers["+chr(34)+_
"WinMan"+chr(34)+"].(null) = 'EMPTY'"
print #1, "bpy.ops.object.add(type='EMPTY')"
case 11: print #1, "bpy.data.window_managers["+chr(34)+_
"WinMan"+chr(34)+"].(null) = 'CAMERA'"
print #1, "bpy.ops.object.add(type='CAMERA')"
case 12: print #1, "bpy.data.window_managers["+chr(34)+_
"WinMan"+chr(34)+"].(null) = 'SPEAKER'"
print #1, "bpy.ops.object.add(type='SPEAKER')"
case 13: print #1, "bpy.ops.object.empty_add(type='PLAIN_AXES')"
case 14: print #1, "bpy.ops.object.empty_add(type='ARROWS')"
case 15: print #1, "bpy.ops.object.empty_add(type='SINGLE_ARROW')"
case 16: print #1, "bpy.ops.object.empty_add(type='CIRCLE')"
case 17: print #1, "bpy.ops.object.empty_add(type='SPHERE')"
case 18: print #1, "bpy.ops.object.empty_add(type='CONE')"
case 19: print #1, "bpy.ops.object.empty_add(type='IMAGE')"
end select
case 4 ' Relations
select case mem64(sys_offset+200)
case 0: print #1 ,"bpy.ops.group.create()"
case 1: print #1, "bpy.ops.object.parent_set(type='OBJECT', keep_transform=False)"
case 2: print #1, "bpy.ops.object.parent_set(type='OBJECT', keep_transform=True)"
case 4: print #1, "bpy.ops.object.parent_set(type='VERTEX')"
case 5: print #1, "bpy.ops.object.parent_set(type='VERTEX_TRI')"
case 6: print #1, "bpy.ops.object.parent_clear(type='CLEAR')"
case 7: print #1, "bpy.ops.object.parent_clear(type='CLEAR_KEEP_TRANSFORM')"
case 8: print #1, "bpy.ops.object.parent_clear(type='CLEAR_INVERSE')'"
case 9: print #1, "bpy.ops.object.make_links_data()"
case 10: print #1, "bpy.ops.object.make_single_user(type='SELECTED_OBJECTS')"
case 11: print #1, "bpy.ops.object.make_single_user(type='ALL')"
case 12: print #1, "bpy.ops.object.make_local(type='SELECT_OBJECT')"
case 13: print #1, "bpy.ops.object.make_local(type='SELECT_OBDATA')"
case 14: print #1, "bpy.ops.object.make_local(type='SELECT_OBDATA_MATERIAL')"
case 15: print #1, "bpy.ops.object.make_local(type='ALL')"
end select
case 5' Tools
select case mem64(sys_offset+200)
case 0: print #1, "bpy.ops.transform.translate(value=("+_
str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))+","+str(mem64(sys_offset+204))+"."+str(mem64(sys_offset+207))+","+_
str(mem64(sys_offset+205))+"."+str(mem64(sys_offset+208))+"))"
case 1: print #1, "bpy.ops.transform.rotate(value="+str(mem64(sys_offset+209))+"."+_
str(mem64(sys_offset+210))+", "+"axis=("+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))+","+_
str(mem64(sys_offset+204))+"."+str(mem64(sys_offset+207))+","+str(mem64(sys_offset+205))+"."+str(mem64(sys_offset+208))+"))"
case 2: print #1, "bpy.ops.transform.resize(value=("+_
str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))+","+str(mem64(sys_offset+204))+"."+str(mem64(sys_offset+207))+","+_
str(mem64(sys_offset+205))+"."+str(mem64(sys_offset+208))+"))"
case 3: print #1, "bpy.ops.transform.mirror()"
case 4: print #1, "bpy.ops.object.join()"
case 5: print #1, "bpy.ops.object.origin_set(type='GEOMETRY_ORIGIN')"
case 6: print #1, "bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')"
case 7: print #1, "bpy.ops.object.origin_set(type='ORIGIN_CURSOR')"
case 8: print #1, "bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS')"
case 9: print #1, "bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_VOLUME')"
case 10: print #1, "bpy.ops.object.shade_smooth()"
case 11: print #1, "bpy.ops.object.shade_flat()"
case 12: print #1, "bpy.ops.object.data_transfer(data_type='VGROUP_WEIGHTS')"
case 13: print #1, "bpy.ops.object.data_transfer(data_type='VGROUP_WEIGHTS')"
case 14: print #1, "bpy.ops.object.data_transfer(data_type='BEVEL_WEIGHT_VERT')"
case 15: print #1, "bpy.ops.object.data_transfer(data_type='SHARP_EDGE')"
case 16: print #1, "bpy.ops.object.data_transfer(data_type='SEAM')"
case 17: print #1, "bpy.ops.object.data_transfer(data_type='CREASE')"
case 18: print #1, "bpy.ops.object.data_transfer(data_type='BEVEL_WEIGHT_EDGE')"
case 19: print #1, "bpy.ops.object.data_transfer(data_type='FREESTYLE_EDGE')"
case 20: print #1, "bpy.ops.object.data_transfer(data_type='CUSTOM_NORMAL')"
case 21: print #1, "bpy.ops.object.data_transfer(data_type='VCOL')"
case 22: print #1, "bpy.ops.object.data_transfer(data_type='UV')"
case 23: print #1, "bpy.ops.object.data_transfer(data_type='SMOOTH')"
case 24: print #1, "bpy.ops.object.data_transfer(data_type='FREESTYLE_FACE')"
case 25: print #1, "bpy.ops.object.datalayout_transfer(data_type='VGROUP_WEIGHTS')"
case 26: print #1, "bpy.ops.object.datalayout_transfer(data_type='BEVEL_WEIGHT_VERT')"
case 27: print #1, "bpy.ops.object.datalayout_transfer(data_type='SHARP_EDGE')"
case 28: print #1, "bpy.ops.object.datalayout_transfer(data_type='SEAM')"
case 29: print #1, "bpy.ops.object.datalayout_transfer(data_type='CREASE')"
case 30: print #1, "bpy.ops.object.datalayout_transfer(data_type='BEVEL_WEIGHT_EDGE')"
case 31: print #1, "bpy.ops.object.datalayout_transfer(data_type='FREESTYLE_EDGE')"
case 32: print #1, "bpy.ops.object.datalayout_transfer(data_type='CUSTOM_NORMAL')"
case 33: print #1, "bpy.ops.object.datalayout_transfer(data_type='VCOL')"
case 34: print #1, "bpy.ops.object.datalayout_transfer(data_type='UV')"
case 35: print #1, "bpy.ops.object.datalayout_transfer(data_type='SMOOTH')"
case 36: print #1, "bpy.ops.object.datalayout_transfer(data_type='FREESTYLE_FACE')"
case 37: print #1, "bpy.ops.object.delete(use_global=False)"
case 38: print #1, "bpy.ops.anim.keyframe_insert_menu(type='Available')"
case 39: print #1, "bpy.ops.anim.keyframe_insert_menu(type='Location')"
case 40: print #1, "bpy.ops.anim.keyframe_insert_menu(type='Rotation')"
case 41: print #1, "bpy.ops.anim.keyframe_insert_menu(type='Scaling')"
case 42: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_LocRot')"
case 43: print #1, "bpy.ops.anim.keyframe_insert_menu(type='LocRotScale')"
case 44: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_LocScale')"
case 45: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_LocScale')"
case 46: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_RotScale')"
case 47: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_DeltaLocation')"
case 48: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_DeltaRotation')"
case 49: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_DeltaScale')"
case 50: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_VisualLoc')"
case 51: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_VisualLoc')"
case 52: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_VisualRot')"
case 53: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_VisualScaling')"
case 54: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_VisualLocRot')"
case 55: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_VisualLocRotScale')"
case 56: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_VisualLocScale')"
case 57: print #1, "bpy.ops.anim.keyframe_insert_menu(type='BUILTIN_KSI_VisualRotScale')"
case 58: print #1, "bpy.ops.anim.keyframe_delete_v3d()"
case 59: print #1, "bpy.ops.object.paths_calculate(start_frame="+str(mem64(sys_offset+203))+", end_frame="+str(mem64(sys_offset+204))+")"
case 60: print #1, "bpy.ops.nla.bake(frame_start=1, frame_end="+str(mem64(sys_offset+203))+", bake_types={'OBJECT'})"
case 61: print #1, "bpy.ops.rigidbody.objects_add(type='ACTIVE')"
case 62: print #1, "bpy.ops.rigidbody.objects_add(type='PASSIVE')"
case 63: print #1, "bpy.ops.rigidbody.objects_remove()"
case 64: print #1, "bpy.ops.object.visual_transform_apply()"
case 65: print #1, "bpy.context.scene.frame_start = " + str(mem64(sys_offset+203))
case 66: print #1, "bpy.context.scene.frame_end = " + str(mem64(sys_offset+203))
case 67: print #1, "bpy.context.scene.frame_current = " + str(mem64(sys_offset+203))
case 68: print #1, "bpy.context.scene.frame_step = " + str(mem64(sys_offset+203))
case 69: print #1, "bpy.ops.rigidbody.bake_to_keyframes(frame_start="+str(mem64(sys_offset+203))+", end_frame="+str(mem64(sys_offset+204))+")"
case 70: print #1, "bpy.ops.ptcache.bake_all()"
case 71: print #1, "bpy.ops.ptcache.free_bake_all()"
case 72: print #1, "bpy.context.object.rigid_body.collision_shape = 'BOX'"
case 73: print #1, "bpy.context.object.rigid_body.collision_shape = 'SPHERE'"
case 74: print #1, "bpy.context.object.rigid_body.collision_shape = 'CAPSULE'"
case 75: print #1, "bpy.context.object.rigid_body.collision_shape = 'CYLINDER'"
case 76: print #1, "bpy.context.object.rigid_body.collision_shape = 'CONE'"
case 77: print #1, "bpy.context.object.rigid_body.collision_shape = 'MESH'"
case 78: print #1, "bpy.ops.ptcache.add()"
case 79: print #1, "bpy.ops.object.forcefield_toggle()"
case 80: print #1, "bpy.ops.rigidbody.constraint_add()"
case 81: print #1, "bpy.ops.rigidbody.constraint_remove()"
case 82: print #1, "bpy.context.object.frame_end = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 83: print #1, "bpy.context.object.frame_step = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 84: print #1, "bpy.context.object.rigid_body.mass = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 85: print #1, "bpy.context.object.rigid_body.friction = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 86: print #1, "bpy.context.object.rigid_body.restitution = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 87: print #1, "bpy.context.object.rigid_body.collision_margin = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 88: print #1, "bpy.context.object.rigid_body.linear_damping = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 89: print #1, "bpy.context.object.rigid_body.angular_damping = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 90: print #1, "bpy.context.object.field.type = 'FORCE'"
case 91: print #1, "bpy.context.object.field.type = 'WIND'"
case 92: print #1, "bpy.context.object.field.type = 'VORTEX'"
case 93: print #1, "bpy.context.object.field.type = 'MAGNET'"
case 94: print #1, "bpy.context.object.field.type = 'HARMONIC'"
case 95: print #1, "bpy.context.object.field.type = 'CHARGE'"
case 96: print #1, "bpy.context.object.field.type = 'LENNARDJ'"
case 97: print #1, "bpy.context.object.field.type = 'TEXTURE'"
case 98: print #1, "bpy.context.object.field.type = 'GUIDE'"
case 99: print #1, "bpy.context.object.field.type = 'BOID'"
case 100: print #1, "bpy.context.object.field.type = 'TURBULENCE'"
case 101: print #1, "bpy.context.object.field.type = 'DRAG'"
case 102: print #1, "bpy.context.object.field.type = 'SMOKE_FLOW'"
case 103: print #1, "bpy.context.object.field.strength = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 104: print #1, "bpy.context.object.field.flow = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 105: print #1, "bpy.context.object.field.falloff_power = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 106: print #1, "bpy.context.object.field.linear_drag = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 107: print #1, "bpy.context.object.field.quadratic_drag = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 108: print #1, "bpy.context.object.field.noise = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 109: print #1, "bpy.context.object.field.seed = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 110: print #1, "bpy.context.object.field.strength = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 111: print #1, "bpy.context.object.field.size = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 112: print #1, "bpy.context.object.field.flow = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 113: print #1, "bpy.context.object.field.noise = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 114: print #1, "bpy.context.object.field.guide_minimum = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 115: print #1, "bpy.context.object.field.guide_free = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 116: print #1, "bpy.context.object.field.falloff_power = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 117: print #1, "bpy.context.object.field.guide_clump_amount = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 118: print #1, "bpy.context.object.field.guide_clump_shape = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 119: print #1, "bpy.context.object.field.strength = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 120: print #1, "bpy.context.object.field.texture_nabla = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 121: print #1, "bpy.context.object.field.rest_length = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 122: print #1, "bpy.context.object.field.harmonic_damping = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 123: print #1, "bpy.context.object.field.shape = 'POINT'"
case 124: print #1, "bpy.context.object.field.shape = 'PLANE'"
case 125: print #1, "bpy.context.object.field.shape = 'SURFACE'"
case 126: print #1, "bpy.context.object.field.shape = 'POINTS'"
case 127: print #1, "bpy.context.object.collision.permeability = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 128: print #1, "bpy.context.object.collision.stickiness = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 129: print #1, "bpy.context.object.collision.thickness_inner = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 130: print #1, "bpy.context.object.collision.thickness_outer = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 131: print #1, "bpy.context.object.collision.damping = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 132: print #1, "bpy.context.object.collision.damping_factor = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 133: print #1, "bpy.context.object.collision.damping_random = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 134: print #1, "bpy.context.object.collision.absorption = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 135: print #1, "bpy.context.object.collision.friction_factor = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 136: print #1, "bpy.context.object.collision.friction_random = "+str(mem64(sys_offset+203))+"."+str(mem64(sys_offset+206))
case 137: print #1, "bpy.ops.fluid.bake()"
case 138: print #1, "bpy.ops.object.modifier_add(type='"+modifier+"')"
case 139: print #1, "bpy.context.object.modifiers["+chr(34)+modtype+chr(34)+"].speed = "+str(mem64(203))+"."+str(mem64(206))
case 140: print #1, "bpy.context.object.modifiers["+chr(34)+modtype+chr(34)+"].width = "+chr(34)+"].speed = "+str(mem64(203))+"."+str(mem64(206))
case 141: print #1, "bpy.context.object.modifiers["+chr(34)+modtype+chr(34)+"].height = "+chr(34)+"].speed = "+str(mem64(203))+"."+str(mem64(206))
case 142: print #1, "bpy.context.object.modifiers["+chr(34)+modtype+chr(34)+"].narrowness = "+chr(34)+"].speed = "+str(mem64(203))+"."+str(mem64(206))
case 143: print #1, "bpy.ops.object.modifier_remove(modifier="+chr(34)+modtype+chr(34)+")"
case 144: print #1, "bpy.ops.object.editmode_toggle()"
case 145: print #1, "bpy.ops.mesh.subdivide(smoothness="+str(mem64(203))+")"
end select
case 6 'Object type
select case mem64(sys_offset+200)
case 0: shape = "Plane"
case 1: shape = "Cube"
case 3: shape = "Circle"
case 4: shape = "Sphere"
case 5: shape = "Icosphere"
case 6: shape = "Cylinder"
case 7: shape = "Cone"
case 8: shape = "Torus"
case 9: shape = "Grid"
case 10: shape = "Suzanne"
case 11: shape = "Lamp"
case 12: shape = "Camera"
end select
case 7 'Shader type
select case mem64(sys_offset+200)
case 0: material = "Add"
shader = "ShaderNodeAddShader"
node = "Add Shader"
ninput = "Surface"
noutput = "Shader"
case 1: material = "Ambient"
shader = "ShaderNodeAmbientOcclusion"
node = "Ambient Occlusion"
ninput = "Surface"
noutput = "AO"
case 2: material = "Antisotropic"
shader = "ShaderNodeBsdfAnisotropic"
node = "Anisotropic BSDF"
ninput = "Surface"
noutput = "BSDF"
case 3: material = "Background"
shader = "ShaderNodeBsdfBackground"
case 4: material = "Deffuse"
shader = "ShaderNodeBsdfDiffuse"
node = "Diffuse BSDF"
ninput = "Surface"
noutput = "BSDF"
case 5: material = "Emission"
shader = "ShaderNodeEmission"
node = "Emission"
ninput = "Surface"
noutput = "Emission"
case 6: material = "Glass"
shader = "ShaderNodeBsdfGlass"
node = "Glass BSDF"
ninput = "Surface"
noutput = "BSDF"
case 7: material = "Glossy"
shader = "ShaderNodeBsdfGlossy"
node = "Glossy BSDF"
ninput = "Surface"
noutput = "BSDF"
case 8: material = "Hair"
shader = "ShaderNodeBsdfHair"
node = "Hair BSDF"
ninput = "Surface"
noutput = "BSDF"
case 9: material = "Holdout"
shader = "ShaderNodeHoldout"
node = "Holdout"
ninput = "Surface"
noutput = "Holdout"
case 10: material = "Mix"
shader = "ShaderNodeMixShader"
node = "Mix Shader"
ninput = "Shader"
noutput = "Shader"
case 11: material = "Principled"
shader = "ShaderNodeBsdfPrincipled"
node = "Principled BSDF"
ninput = "Surface"
noutput = "BSDF"
case 12: material = "Refraction"
shader = "ShaderNodeBsdfRefraction"
node = "Refraction BSDF"
ninput = "Surface"
case 13: material = "Subsurface"
shader = "ShaderNodeSubsurfaceScattering"
node = "Subsurface Scattering"
ninput = "Surface"
noutput = "BSDF"
case 14: material = "Toon"
shader = "ShaderNodeBsdfToon"
node = "Toon BSDF"
ninput = "Surface"
noutput = "BSDF"
case 15: material = "Translucent"
shader = "ShaderNodeBsdfTranslucent"
node = "Translucent BSDF"
ninput = "Surface"
noutput = "BSDF"
case 16: material = "Transparent"
shader = "ShaderNodeBsdfTransparent"
node = "Transparent BSDF"
ninput = "Surface"
noutput = "BSDF"
case 17: material = "Velvet"
shader = "ShaderNodeBsdfVelvet"
node = "Velvet BSDF"
ninput = "Surface"
noutput = "BSDF"
case 18: material = "Absorption"
shader = "ShaderNodeVolumeAbsorption"
node = "Volume Absorption"
ninput = "Surface"
noutput = "BSDF"
case 19: material = "Scatter"
shader = "ShaderNodeVolumeScatter"
node = "Volume Scatter"
ninput = "Surface"
noutput = "BSDF"
end select
case 8 'Node type
select case mem64(sys_offset+200)
case 0: node = "Blackbody"
case 1: node = "ColorRamp"
case 2: node = "Combine HSV"
case 3: node = "Combine RGB"
case 4: node = "Combine XYZ"
case 5: node = "RGBtoBW"
case 6: node = "Separate HSV"
case 9: node = "Separate RGB"
case 10: node = "Separate XYZ"
case 11: node = "Bump"
case 12: node = "Mapping"
case 13: node = "Normal"
case 14: node = "Vector Curves"
case 15: node = "Vector Transform"
case 16: node = "BrightContrast"
case 17: node = "Gamma"
case 18: node = "Hue Saturation Value"
case 19: node = "Invert"
case 20: node = "Light Falloff"
case 21: node = "Mix"
case 22: node = "RGB Curves"
case 23: node = "Brick Texture"
case 24: node = "Checker Texture"
case 25: node = "Environment Texture"
case 26: node = "Gradient Texture"
case 27: node = "Image Texture"
case 28: node = "Magic Texture"
case 29: node = "Musgrave Texture"
case 30: node = "Noise Texture"
case 31: node = "Point Density"
case 32: node = "Sky Texture"
case 33: node = "Voronoi Texture"
case 34: node = "Wave Texture"
case 35: node = "Lamp Output"
case 36: node = "Materal Output"
case 37: node = "Attribute"
case 38: node = "Camera Data"
case 39: node = "Fresnel"
case 40: node = "Geometry"
case 41: node = "Hair Info"
case 42: node = "Layer Weight"
case 43: node = "Light Path"
case 44: node = "Object Info"
case 45: node = "Particle Info"
case 46: node = "RGB"
case 47: node = "Tangent"
case 48: node = "Texture Coordinate"
case 49: node = "UV Map"
case 50: node = "Value"
case 51: node = "Wireframe"
end select
case 9 'Input type
select case mem64(sys_offset+200)
case 0: ninput = "Surface"
case 1: ninput = "Color"
case 2: ninput = "Roughness"
case 3: ninput = "Rotation"
case 4: ninput = "Normal"
case 5: ninput = "Tangent"
case 6: ninput = "Strength"
case 7: ninput = "IOR"
case 8: ninput = "Offset"
case 9: ninput = "RoughtnessU"
case 10: ninput = "RoughtnessV"
case 11: ninput = "Fac"
case 12: ninput = "BaseColor"
case 13: ninput = "Subsurface"
case 14: ninput = "Subsurface Radius"
case 15: ninput = "Subsurface Color"
case 16: ninput = "Specular"
case 17: ninput = "Specular Tint"
case 18: ninput = "Anistropic Rotation"
case 19: ninput = "Sheen"
case 20: ninput = "Sheen Tint"
case 21: ninput = "Clearcoat"
case 22: ninput = "Clearcoat Roughness"
case 23: ninput = "Transmission"
case 24: ninput = "Clearcoat Normal"
case 25: ninput = "Scale"
case 26: ninput = "Radius"
case 27: ninput = "Texture Blur"
case 28: ninput = "Size"
case 29: ninput = "Smooth"
case 30: ninput = "Sigma"
case 31: ninput = "Density"
case 32: ninput = "Anistropy"
end select
/' case 10 'Ootput type
select case mem64(sys_offset+200)
case 0
end select '/
case 10 'Select object = True
select case mem64(sys_offset+200)
case 0
print #1, "bpy.data.objects['"+shape+"'].select = True"
case 1 to 9
print #1, "bpy.data.objects['"+shape+".00"+_
str(mem64(sys_offset+203))+"'].select = True"
case 10 to 99
print #1, "bpy.data.objects['"+shape+".0"+_
str(mem64(sys_offset+203))+"'].select = True"
case else
print #1, "bpy.data.objects['"+_
shape+str(mem64(sys_offset+203))+"'].select = True"
end select
case 11 'Set active object
select case mem64(sys_offset+200)
case 0
print #1, "bpy.context.scene.objects.active = bpy.data.objects['"+shape+"']"
case 1 to 9
print #1, "bpy.context.scene.objects.active = bpy.data.objects['"+shape+".00"+str(mem64(sys_offset+203))+"']"
case 10 to 99
print #1, "bpy.context.scene.objects.active = bpy.data.objects['"+shape+".0"+str(mem64(sys_offset+203))+"']"
case else
print #1, "bpy.context.scene.objects.active = bpy.data.objects['"+shape+str(mem64(sys_offset+203))+"']"
end select
case 12 'Ambient occlusion setting
select case mem64(sys_offset+200)
case 0
print #1, "bpy.context.scene.world.light_settings.use_ambient_occlusion = False"
case 1
print #1, "bpy.context.scene.world.light_settings.use_ambient_occlusion = True"
end select
case 13 'Create new material
select case mem64(sys_offset+200)
case 0
print #1, "bpy.data.materials.new('"+material+"')"
case 1 to 9
print #1, "bpy.data.materials.new('"+material+".00"+str(mem64(sys_offset+203))+"')"
case 10 to 99
print #1, "bpy.data.materials.new('"+material+".0"+str(mem64(sys_offset+203))+"')"
case else
print #1, "bpy.data.materials.new('"+material+str(mem64(sys_offset+203))+"')"
end select
case 14 'Turn material nodes off
select case mem64(sys_offset+200)
case 0
print #1, "bpy.data.materials['"+material+"'].use_nodes = False"
case 1 to 9
print #1, "bpy.data.materials['"+material+".00"+str(mem64(sys_offset+203))+"'].use_nodes = False"
case 10 to 99
print #1, "bpy.data.materials['"+material+".0"+str(mem64(sys_offset+203))+"'].use_nodes = False"
case else
print #1, "bpy.data.materials['"+material+str(mem64(sys_offset+203))+"'].use_nodes = False"
end select
case 15 'Turn material nodes on
select case mem64(sys_offset+200)
case 0
print #1, "bpy.data.materials['"+material+"'].use_nodes = True"
case 1 to 9
print #1, "bpy.data.materials['"+material+".00"+str(mem64(sys_offset+203))+"'].use_nodes = True"
case 10 to 99
print #1, "bpy.data.materials['"+material+".0"+str(mem64(sys_offset+203))+"'].use_nodes = True"
case else
print #1, "bpy.data.materials['"+material+str(mem64(sys_offset+203))+"'].use_nodes = True"
end select
case 16 'Setup new material
select case mem64(sys_offset+200)
case 0
print #1, "bpy.data.materials['"+material+"'].node_tree.nodes.new(type="+_
chr(34)+shader+chr(34)+")"
print #1, "inp = bpy.data.materials['"+material+_
"'].node_tree.nodes["+chr(34)+_
"Material Output"+chr(34)+_
"].inputs["+chr(34)+ninput+chr(34)+"]"
print #1, "outp = bpy.data.materials['"+material+_
"'].node_tree.nodes["+chr(34)+node+chr(34)+_
"].outputs["+chr(34)+noutput+chr(34)+"]"
case 1 to 9
print #1, "bpy.data.materials['"+material+".00"+str(mem64(sys_offset+203))+_
"'].node_tree.nodes.new(type="+chr(34)+shader+chr(34)+")"
print #1, "inp = bpy.data.materials['"+material+_
".00"+str(mem64(sys_offset+203))+"'].node_tree.nodes["+chr(34)+_
"Material Output"+chr(34)+"].inputs["+_
chr(34)+ninput+chr(34)+"]"
print #1, "outp = bpy.data.materials['"+material+_
".00"+str(mem64(sys_offset+203))+"'].node_tree.nodes["+chr(34)+_
node+chr(34)+"].outputs["+chr(34)+noutput+chr(34)+"]"
case 10 to 99
print #1, "bpy.data.materials['"+material+".0"+str(mem64(sys_offset+203))+_
"'].node_tree.nodes.new(type="+chr(34)+shader+chr(34)+")"
print #1, "inp = bpy.data.materials['"+material+_
".0"+str(mem64(sys_offset+203))+"'].node_tree.nodes["+chr(34)+_
"Material Output"+chr(34)+"].inputs["+_
chr(34)+ninput+chr(34)+"]"
print #1, "outp = bpy.data.materials['"+material+_
".0"+str(mem64(sys_offset+203))+"'].node_tree.nodes["+chr(34)+_
node+chr(34)+"].outputs["+chr(34)+noutput+chr(34)+"]"
case else
print #1, "bpy.data.materials['"+material+str(mem64(sys_offset+203))+_