-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSAC_Settings.py
2607 lines (2255 loc) · 103 KB
/
SAC_Settings.py
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
# ##### BEGIN GPL LICENSE BLOCK #####
#
# <Adds plenty of new features to Blenders camera and compositor>
# Copyright (C) <2023> <Kevin Lorengel>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Alternatively, see <https://www.gnu.org/licenses/>.
#
# ##### END GPL LICENSE BLOCK #####
import bpy
import math
from bpy.types import (
PropertyGroup,
)
from bpy.props import (
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
BoolProperty,
PointerProperty,
)
class SAC_Settings(PropertyGroup):
# EffectTypes
effect_types = [
# Bokeh
('SAC_BOKEH', 'Bokeh', 'SEQ_CHROMA_SCOPE'),
# Chromatic Aberration
('SAC_CHROMATICABERRATION', 'Chromatic Aberation', 'MOD_EDGESPLIT'),
# Duotone
('SAC_DUOTONE', 'Duotone', 'MOD_TINT'),
# Emboss
('SAC_EMBOSS', 'Emboss', 'AXIS_TOP'),
# Filmgrain
('SAC_FILMGRAIN', 'Film Grain', 'ALIGN_FLUSH'),
# Fish Eye
('SAC_FISHEYE', 'Fish Eye', 'MESH_UVSPHERE'),
# Fog Glow
('SAC_FOGGLOW', 'Fog Glow', 'ALIGN_FLUSH'),
# Ghost
('SAC_GHOST', 'Ghost', 'GHOST_DISABLED'),
# Gradient Map
('SAC_GRADIENTMAP', 'Gradient Map', 'SNAP_INCREMENT'),
# Halftone
('SAC_HALFTONE', 'Halftone', 'LIGHTPROBE_GRID'),
# Infrared
('SAC_INFRARED', 'Infrared', 'OUTLINER_DATA_LIGHT'),
# ISO Noise
('SAC_ISONOISE', 'ISO Noise', 'ALIGN_FLUSH'),
# Mosaic
('SAC_MOSAIC', 'Mosaic', 'MOD_UVPROJECT'),
# Negative
('SAC_NEGATIVE', 'Negative', 'SELECT_DIFFERENCE'),
# Overlay
('SAC_OVERLAY', 'Overlay', 'XRAY'),
# Perspective Shift
('SAC_PERSPECTIVESHIFT', 'Perspective Shift', 'VIEW_PERSPECTIVE'),
# Posterize
('SAC_POSTERIZE', 'Posterize', 'IMAGE_ZDEPTH'),
# Streaks
('SAC_STREAKS', 'Streaks', 'LIGHT_SUN'),
# Vignette
('SAC_VIGNETTE', 'Vignette', 'CLIPUV_DEHLT'),
# Warp
('SAC_WARP', 'Warp', 'MOD_WARP'),
# Glitch
('SAC_GLITCH', 'Glitch', 'LIBRARY_DATA_BROKEN'),
# Oil Paint
('SAC_OILPAINT', 'Oil Paint', 'MOD_FLUIDSIM'),
# Pointillism
('SAC_POINTILLISM', 'Pointillism', 'PARTICLE_POINT'),
# Sketch
('SAC_SKETCH', 'Sketch', 'GREASEPENCIL'),
# Watercolor
('SAC_WATERCOLOR', 'Watercolor', 'BRUSHES_ALL'),
]
gradient_types = [
("Platinum", "Platinum"),
("Selenium 1", "Selenium 1"),
("Selenium 2", "Selenium 2"),
("Sepia 1", "Sepia 1"),
("Sepia 2", "Sepia 2"),
("Sepia 3", "Sepia 3"),
("Sepia 4", "Sepia 4"),
("Sepia 5", "Sepia 5"),
("Sepia 6", "Sepia 6"),
("Sepia Highlights 1", "Sepia Highlights 1"),
("Sepia Highlights 2", "Sepia Highlights 2"),
("Sepia Midtones", "Sepia Midtones"),
("Gold 1", "Gold 1"),
("Gold 2", "Gold 2"),
("Blue 1", "Blue 1"),
("Blue 2", "Blue 2"),
("Cyanotype", "Cyanotype"),
("Copper 1", "Copper 1"),
("Copper 2", "Copper 2"),
("Sepia-Selenium 1", "Sepia-Selenium 1"),
("Sepia-Selenium 2", "Sepia-Selenium 2"),
("Sepia-Selenium 3", "Sepia-Selenium 3"),
("Sepia-Cyan", "Sepia-Cyan"),
("Sepia-Blue 1", "Sepia-Blue 1"),
("Sepia-Blue 2", "Sepia-Blue 2"),
("Gold-Sepia", "Gold-Sepia"),
("Gold-Selenium 1", "Gold-Selenium 1"),
("Gold-Selenium 2", "Gold-Selenium 2"),
("Gold-Copper", "Gold-Copper"),
("Gold-Blue", "Gold-Blue"),
("Blue-Selenium 1", "Blue-Selenium 1"),
("Blue-Selenium 2", "Blue-Selenium 2"),
("Cyan-Selenium", "Cyan-Selenium"),
("Cyan-Sepia", "Cyan-Sepia"),
("Copper-Sepia", "Copper-Sepia"),
("Cobalt-Iron 1", "Cobalt-Iron 1"),
("Cobalt-Iron 2", "Cobalt-Iron 2"),
("Cobalt-Iron 3", "Cobalt-Iron 3"),
("Hard", "Hard"),
("Skies", "Skies"),
]
# Slow Effects
slow_effects = [
"SAC_BOKEH"
]
bokeh_types = [
# Carl Zeiss - Contax Planar - f/2.8 - 60mm
# f/2.8
("CarlZeiss_ContaxPlanar_f2.8_60mm_f2.8", "Carl Zeiss - Contax Planar - 60mm - f/2.8"),
# f/4
("CarlZeiss_ContaxPlanar_f2.8_60mm_f4.0", "Carl Zeiss - Contax Planar - 60mm - f/4.0"),
# f/5.6
("CarlZeiss_ContaxPlanar_f2.8_60mm_f5.6", "Carl Zeiss - Contax Planar - 60mm - f/5.6"),
# f/8
("CarlZeiss_ContaxPlanar_f2.8_60mm_f8.0", "Carl Zeiss - Contax Planar - 60mm - f/8.0"),
# f/11
("CarlZeiss_ContaxPlanar_f2.8_60mm_f11.0", "Carl Zeiss - Contax Planar - 60mm - f/11.0"),
# f/16
("CarlZeiss_ContaxPlanar_f2.8_60mm_f16.0", "Carl Zeiss - Contax Planar - 60mm - f/16.0"),
# f/22
("CarlZeiss_ContaxPlanar_f2.8_60mm_f22.0", "Carl Zeiss - Contax Planar - 60mm - f/22.0"),
# Centon - Centon - f/8 - 500mm
# 2.15m
("Centon_Centon_2.15m_500mm_f8.0", "Centon - Centon - 500mm - f/8.0 - focus on 2.15m"),
# infinity
("Centon_Centon_Infinity_500mm_f8.0", "Centon - Centon - 500mm - f/8.0 - focus on infinity"),
# Cosina - Cosinon - f/4.0 - 200mm
# f/4
("Cosina_Cosinon_f4.0_200mm_f4.0", "Cosina - Cosinon - 200mm - f/4.0"),
# f/5.6
("Cosina_Cosinon_f4.0_200mm_f5.6", "Cosina - Cosinon - 200mm - f/5.6"),
# f/8
("Cosina_Cosinon_f4.0_200mm_f8.0", "Cosina - Cosinon - 200mm - f/8.0"),
# f/11
("Cosina_Cosinon_f4.0_200mm_f11.0", "Cosina - Cosinon - 200mm - f/11.0"),
# f/16
("Cosina_Cosinon_f4.0_200mm_f16.0", "Cosina - Cosinon - 200mm - f/16.0"),
# f/22
("Cosina_Cosinon_f4.0_200mm_f22.0", "Cosina - Cosinon - 200mm - f/22.0"),
# Jupiter - 9 - f/2.0 - 85mm
# f/2
("Jupiter_9_f2.0_85mm_f2.0", "Jupiter - 9 - 85mm - f/2.0"),
# f/2.8
("Jupiter_9_f2.0_85mm_f2.8", "Jupiter - 9 - 85mm - f/2.8"),
# f/4
("Jupiter_9_f2.0_85mm_f4.0", "Jupiter - 9 - 85mm - f/4.0"),
# f/5.6
("Jupiter_9_f2.0_85mm_f5.6", "Jupiter - 9 - 85mm - f/5.6"),
# f/8
("Jupiter_9_f2.0_85mm_f8.0", "Jupiter - 9 - 85mm - f/8.0"),
# f/11
("Jupiter_9_f2.0_85mm_f11.0", "Jupiter - 9 - 85mm - f/11.0"),
# f/16
("Jupiter_9_f2.0_85mm_f16.0", "Jupiter - 9 - 85mm - f/16.0"),
# Olympus - OmZuiko - f/2.8 - 100mm
# f/2.8
("Olympus_OmZuiko_f2.8_100mm_f2.8", "Olympus - OmZuiko - 100mm - f/2.8"),
# f/4
("Olympus_OmZuiko_f2.8_100mm_f4.0", "Olympus - OmZuiko - 100mm - f/4.0"),
# f/5.6
("Olympus_OmZuiko_f2.8_100mm_f5.6", "Olympus - OmZuiko - 100mm - f/5.6"),
# f/8
("Olympus_OmZuiko_f2.8_100mm_f8.0", "Olympus - OmZuiko - 100mm - f/8.0"),
# f/11
("Olympus_OmZuiko_f2.8_100mm_f11.0", "Olympus - OmZuiko - 100mm - f/11.0"),
# Pentax - SMC - f/2.0 - 50mm
# f/2
("Pentax_SMC_f2.0_50mm_f2.0", "Pentax - SMC - 50mm - f/2.0"),
# f/2.8
("Pentax_SMC_f2.0_50mm_f2.8", "Pentax - SMC - 50mm - f/2.8"),
# f/4
("Pentax_SMC_f2.0_50mm_f4.0", "Pentax - SMC - 50mm - f/4.0"),
# f/5.6
("Pentax_SMC_f2.0_50mm_f5.6", "Pentax - SMC - 50mm - f/5.6"),
# f/8
("Pentax_SMC_f2.0_50mm_f8.0", "Pentax - SMC - 50mm - f/8.0"),
# f/11
("Pentax_SMC_f2.0_50mm_f11.0", "Pentax - SMC - 50mm - f/11.0"),
# Takumar - SMC - f3.5 - 135mm
# f/3.5
("Takumar_SMC_f3.5_135mm_f3.5", "Takumar - SMC - 135mm - f/3.5"),
# f/5.6
("Takumar_SMC_f3.5_135mm_f5.6", "Takumar - SMC - 135mm - f/5.6"),
# f/8
("Takumar_SMC_f3.5_135mm_f8.0", "Takumar - SMC - 135mm - f/8.0"),
# f/11
("Takumar_SMC_f3.5_135mm_f11.0", "Takumar - SMC - 135mm - f/11.0"),
# f/16
("Takumar_SMC_f3.5_135mm_f16.0", "Takumar - SMC - 135mm - f/16.0"),
# f/22
("Takumar_SMC_f3.5_135mm_f22.0", "Takumar - SMC - 135mm - f/22.0"),
# Takumar - Super - f/1.4 - 50mm
# f/1.4
("Takumar_Super_f1.4_50mm_f1.4", "Takumar - Super - 50mm - f/1.4"),
# f/2
("Takumar_Super_f1.4_50mm_f2.0", "Takumar - Super - 50mm - f/2.0"),
# f/2.8
("Takumar_Super_f1.4_50mm_f2.8", "Takumar - Super - 50mm - f/2.8"),
# f/4
("Takumar_Super_f1.4_50mm_f4.0", "Takumar - Super - 50mm - f/4.0"),
# f/5.6
("Takumar_Super_f1.4_50mm_f5.6", "Takumar - Super - 50mm - f/5.6"),
# f/8
("Takumar_Super_f1.4_50mm_f8.0", "Takumar - Super - 50mm - f/8.0"),
# Takumar - Super - f/1.8 - 55mm
# f/1.8
("Takumar_Super_f1.8_55mm_f1.8", "Takumar - Super - 55mm - f/1.8"),
# f/2.8
("Takumar_Super_f1.8_55mm_f2.8", "Takumar - Super - 55mm - f/2.8"),
# f/4
("Takumar_Super_f1.8_55mm_f4.0", "Takumar - Super - 55mm - f/4.0"),
# f/5.6
("Takumar_Super_f1.8_55mm_f5.6", "Takumar - Super - 55mm - f/5.6"),
# f/8
("Takumar_Super_f1.8_55mm_f8.0", "Takumar - Super - 55mm - f/8.0"),
# Takumar - Super - f/2.0 - 55mm
# f/2
("Takumar_Super_f2.0_55mm_f2.0", "Takumar - Super - 55mm - f/2.0"),
# f/2.8
("Takumar_Super_f2.0_55mm_f2.8", "Takumar - Super - 55mm - f/2.8"),
# f/4
("Takumar_Super_f2.0_55mm_f4.0", "Takumar - Super - 55mm - f/4.0"),
# f/5.6
("Takumar_Super_f2.0_55mm_f5.6", "Takumar - Super - 55mm - f/5.6"),
# f/8
("Takumar_Super_f2.0_55mm_f8.0", "Takumar - Super - 55mm - f/8.0"),
# Takumar - Super - f/4.0 - 150mm
# f/4
("Takumar_Super_f4.0_150mm_f4.0", "Takumar - Super - 150mm - f/4.0"),
# f/5.6
("Takumar_Super_f4.0_150mm_f5.6", "Takumar - Super - 150mm - f/5.6"),
# f/8
("Takumar_Super_f4.0_150mm_f8.0", "Takumar - Super - 150mm - f/8.0"),
# f/11
("Takumar_Super_f4.0_150mm_f11.0", "Takumar - Super - 150mm - f/11.0"),
# f/16
("Takumar_Super_f4.0_150mm_f16.0", "Takumar - Super - 150mm - f/16.0"),
# f/22
("Takumar_Super_f4.0_150mm_f22.0", "Takumar - Super - 150mm - f/22.0"),
# Tamron - Adaptall - f/2.5 - 90mm
# f/2.5
("Tamron_Adaptall_f2.5_90mm_f2.5", "Tamron - Adaptall - 90mm - f/2.5"),
# f/4
("Tamron_Adaptall_f2.5_90mm_f4.0", "Tamron - Adaptall - 90mm - f/4.0"),
# f/5.6
("Tamron_Adaptall_f2.5_90mm_f5.6", "Tamron - Adaptall - 90mm - f/5.6"),
# f/8
("Tamron_Adaptall_f2.5_90mm_f8.0", "Tamron - Adaptall - 90mm - f/8.0"),
# f/11
("Tamron_Adaptall_f2.5_90mm_f11.0", "Tamron - Adaptall - 90mm - f/11.0"),
# f/16
("Tamron_Adaptall_f2.5_90mm_f16.0", "Tamron - Adaptall - 90mm - f/16.0"),
# f/22
("Tamron_Adaptall_f2.5_90mm_f22.0", "Tamron - Adaptall - 90mm - f/22.0"),
# Tamron - Adaptall55bb - f/8.0 - 500mm
# 2m
("Tamron_Adaptall55bb_2m_500mm_f8.0", "Tamron - Adaptall 55bb - 500mm - f/8.0 - focus on 2m"),
# infinity
("Tamron_Adaptall55bb_Infinity_500mm_f8.0", "Tamron - Adaptall 55bb - 500mm - f/8.0 - focus on infinity"),
# Topman - MC - f/2.8 - 135mm
# f/2.8
("Topman_MC_f2.8_135mm_f2.8", "Topman - MC - 135mm - f/2.8"),
# f/4
("Topman_MC_f2.8_135mm_f4.0", "Topman - MC - 135mm - f/4.0"),
# f/5.6
("Topman_MC_f2.8_135mm_f5.6", "Topman - MC - 135mm - f/5.6"),
# f/8
("Topman_MC_f2.8_135mm_f8.0", "Topman - MC - 135mm - f/8.0"),
# f/11
("Topman_MC_f2.8_135mm_f11.0", "Topman - MC - 135mm - f/11.0"),
# f/16
("Topman_MC_f2.8_135mm_f16.0", "Topman - MC - 135mm - f/16.0"),
# f/22
("Topman_MC_f2.8_135mm_f22.0", "Topman - MC - 135mm - f/22.0"),
# Vivitar - Vivitar - f/2.8 - 55mm
# f/2.8
("Vivitar_Vivitar_f2.8_55mm_f2.8", "Vivitar - Vivitar - 55mm - f/2.8"),
# f/4
("Vivitar_Vivitar_f2.8_55mm_f4.0", "Vivitar - Vivitar - 55mm - f/4.0"),
# f/5.6
("Vivitar_Vivitar_f2.8_55mm_f5.6", "Vivitar - Vivitar - 55mm - f/5.6"),
# f/8
("Vivitar_Vivitar_f2.8_55mm_f8.0", "Vivitar - Vivitar - 55mm - f/8.0"),
# f/11
("Vivitar_Vivitar_f2.8_55mm_f11.0", "Vivitar - Vivitar - 55mm - f/11.0"),
# f/16
("Vivitar_Vivitar_f2.8_55mm_f16.0", "Vivitar - Vivitar - 55mm - f/16.0"),
]
filter_types_bw = (
# 1920
("1920", "1920"),
# Dusty
("Dusty", "Dusty"),
# Grayed
("Grayed", "Grayed"),
# Litho
("Litho", "Litho"),
# Sepia
("Sepia", "Sepia"),
# Steel
("Steel", "Steel"),
# Weathered
("Weathered", "Weathered")
)
filter_types_vintage = (
# Ancient
("Ancient", "Ancient"),
# Classic
("Classic", "Classic"),
# Inferno
("Inferno", "Inferno"),
# Lomo
("Lomo", "Lomo"),
# Lomo 100
("Lomo 100", "Lomo 100"),
# Oldtimer
("Oldtimer", "Oldtimer"),
# Pola SX
("Pola SX", "Pola SX"),
# Polaroid
("Polaroid", "Polaroid"),
# Quozi
("Quozi", "Quozi"),
# Seventies
("Seventies", "Seventies"),
# Snappy
("Snappy", "Snappy"),
# Sunny 70s
("Sunny 70s", "Sunny 70s")
)
filter_types_neat = (
# Candy
("Candy", "Candy"),
# Chestnut
("Chestnut", "Chestnut"),
# Creamy
("Creamy", "Creamy"),
# Fixie
("Fixie", "Fixie"),
# Food
("Food", "Food"),
# Glam
("Glam", "Glam"),
# Goblin
("Goblin", "Goblin"),
# Green Gap
("Green Gap", "Green Gap"),
# High Carb
("High Carb", "High Carb"),
# High Contrast
("High Contrast", "High Contrast"),
# K1
("K1", "K1"),
# K6
("K6", "K6"),
# Keen
("Keen", "Keen"),
# Lucid
("Lucid", "Lucid"),
# Moss
("Moss", "Moss"),
# Neat
("Neat", "Neat"),
# Pebble
("Pebble", "Pebble"),
# Pro 400
("Pro 400", "Pro 400"),
# Soft
("Soft", "Soft"),
# Softy
("Softy", "Softy")
)
filter_types_cold = (
# Colla
("Colla", "Colla"),
# Fridge
("Fridge", "Fridge"),
# Joran
("Joran", "Joran"),
# Kalmen
("Kalmen", "Kalmen"),
# Levante
("Levante", "Levante"),
# Pitched
("Pitched", "Pitched"),
# Settled
("Settled", "Settled"),
# Solanus
("Solanus", "Solanus"),
# Zephyr
("Zephyr", "Zephyr")
)
filter_types_warm = (
# Flat Black
("Flat Black", "Flat Black"),
# Golden
("Golden", "Golden"),
# Low Fire
("Low Fire", "Low Fire"),
# Pale
("Pale", "Pale"),
# Pumpkin
("Pumpkin", "Pumpkin"),
# Summer
("Summer", "Summer"),
# Sunrise
("Sunrise", "Sunrise"),
# Tender
("Tender", "Tender"),
# Twilight
("Twilight", "Twilight")
)
filter_types = [
# Default
("Default", "Default")
]
filter_types.extend(filter_types_bw)
filter_types.extend(filter_types_vintage)
filter_types.extend(filter_types_neat)
filter_types.extend(filter_types_cold)
filter_types.extend(filter_types_warm)
def update_filter_type(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
filter_types = self.filter_types
filter_types = [
# Default
("Default", "Default")
]
if settings.filter_type == "BW":
filter_types.extend(self.filter_types_bw)
elif settings.filter_type == "Vintage":
filter_types.extend(self.filter_types_vintage)
elif settings.filter_type == "Neat":
filter_types.extend(self.filter_types_neat)
elif settings.filter_type == "Cold":
filter_types.extend(self.filter_types_cold)
elif settings.filter_type == "Warm":
filter_types.extend(self.filter_types_warm)
else:
filter_types.extend(self.filter_types_bw)
filter_types.extend(self.filter_types_vintage)
filter_types.extend(self.filter_types_neat)
filter_types.extend(self.filter_types_cold)
filter_types.extend(self.filter_types_warm)
scene.new_filter_type = "Default"
SAC_Settings.filter_types = filter_types
filter_type: EnumProperty(
name="Filter Type",
description="Filter the fitlter list by type",
items=(
("All", "All", "All filters", "WORLD", 0),
("BW", "Black and White", "An assortment of monochrome filters", "OVERLAY", 1),
("Vintage", "Vintage", "An assortment of vintage filters", "DISC", 2),
("Neat", "Neat", "An assortment of neat filters", "BOIDS", 3),
("Cold", "Cold", "An assortment of cold filters", "FREEZE", 4),
("Warm", "Warm", "An assortment of warm filters", "LIGHT_SUN", 5),
),
default="All",
update=update_filter_type
)
# region Colorgrade
# White Level
def update_Colorgrade_Color_WhiteLevel(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC WhiteLevel"].nodes["SAC Colorgrade_Color_WhiteLevel"].inputs[3].default_value[0] = settings.Colorgrade_Color_WhiteLevel[0]
bpy.data.node_groups[".SAC WhiteLevel"].nodes["SAC Colorgrade_Color_WhiteLevel"].inputs[3].default_value[1] = settings.Colorgrade_Color_WhiteLevel[1]
bpy.data.node_groups[".SAC WhiteLevel"].nodes["SAC Colorgrade_Color_WhiteLevel"].inputs[3].default_value[2] = settings.Colorgrade_Color_WhiteLevel[2]
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC WhiteLevel"].mute = False
if (
settings.Colorgrade_Color_WhiteLevel[0] == 1 and
settings.Colorgrade_Color_WhiteLevel[1] == 1 and
settings.Colorgrade_Color_WhiteLevel[2] == 1
):
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC WhiteLevel"].mute = True
Colorgrade_Color_WhiteLevel: FloatVectorProperty(
name="White Balance",
description="Adjusts the overall color tone of an image to make it appear more natural,\ncompensating for the color temperature of the light source",
min=0.0,
max=1.0,
default=(1.0, 1.0, 1.0),
subtype="COLOR",
update=update_Colorgrade_Color_WhiteLevel
)
# Temperature
def update_Colorgrade_Color_Temperature(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Temperature"].nodes["SAC Colorgrade_Color_Temperature"].inputs[0].default_value = settings.Colorgrade_Color_Temperature
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Temperature"].mute = False
if settings.Colorgrade_Color_Temperature == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Temperature"].mute = True
Colorgrade_Color_Temperature: FloatProperty(
name="Temperature",
description="Adjusts the color balance of an image,\nmaking it cooler (bluer) or warmer (more orange)",
default=0,
max=1,
min=-1,
subtype="FACTOR",
update=update_Colorgrade_Color_Temperature
)
# Tint
def update_Colorgrade_Color_Tint(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Tint"].nodes["SAC Colorgrade_Color_Tint"].inputs[0].default_value = settings.Colorgrade_Color_Tint
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Tint"].mute = False
if settings.Colorgrade_Color_Tint == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Tint"].mute = True
Colorgrade_Color_Tint: FloatProperty(
name="Tint",
description="Adjusts the green-magenta balance in an image,\ncompensating for color cast from certain light sources",
default=0,
max=1,
min=-1,
subtype="FACTOR",
update=update_Colorgrade_Color_Tint
)
# Saturation
def update_Colorgrade_Color_Saturation(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Saturation"].nodes["SAC Colorgrade_Color_Saturation"].inputs[2].default_value = settings.Colorgrade_Color_Saturation
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Saturation"].mute = False
if (settings.Colorgrade_Color_Saturation == 1) and (settings.Colorgrade_Color_Hue == 0.5):
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Saturation"].mute = True
Colorgrade_Color_Saturation: FloatProperty(
name="Saturation",
description="Increases or decreases the intensity of colors in an image, from vivid to gray",
default=1,
max=2,
min=0,
subtype="FACTOR",
update=update_Colorgrade_Color_Saturation
)
# Hue1
def update_Colorgrade_Color_Hue(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Saturation"].nodes["SAC Colorgrade_Color_Saturation"].inputs[1].default_value = settings.Colorgrade_Color_Hue
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Saturation"].mute = False
if (settings.Colorgrade_Color_Hue == 0.5) and (settings.Colorgrade_Color_Saturation == 1):
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Saturation"].mute = True
Colorgrade_Color_Hue: FloatProperty(
name="Hue",
description="Rotates the hue of all colors in the image around the color wheel",
default=0.5,
max=1,
min=0,
subtype="FACTOR",
update=update_Colorgrade_Color_Hue
)
# LIGHT
# Exposure
def update_Colorgrade_Light_Exposure(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Exposure"].nodes["SAC Colorgrade_Light_Exposure"].inputs[1].default_value = settings.Colorgrade_Light_Exposure
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Exposure"].mute = False
if settings.Colorgrade_Light_Exposure == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Exposure"].mute = True
Colorgrade_Light_Exposure: FloatProperty(
name="Exposure",
description="Adjusts the overall brightness of the image",
default=0,
max=10,
soft_max=5,
min=-10,
soft_min=-5,
subtype="FACTOR",
update=update_Colorgrade_Light_Exposure
)
# Contrast
def update_Colorgrade_Light_Contrast(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Contrast"].nodes["SAC Colorgrade_Light_Contrast"].inputs[2].default_value = settings.Colorgrade_Light_Contrast
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Contrast"].mute = False
if settings.Colorgrade_Light_Contrast == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Contrast"].mute = True
Colorgrade_Light_Contrast: FloatProperty(
name="Contrast",
description="Modifies the difference between the darkest and lightest parts of an image,\nmaking shadows deeper and highlights brighter",
default=0,
max=100,
soft_max=25,
min=-100,
soft_min=-25,
subtype="FACTOR",
update=update_Colorgrade_Light_Contrast
)
# Highlights
def update_Colorgrade_Light_Highlights(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Highlights"].nodes["SAC Colorgrade_Light_Highlights"].inputs[0].default_value = settings.Colorgrade_Light_Highlights
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Highlights"].mute = False
if settings.Colorgrade_Light_Highlights == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Highlights"].mute = True
Colorgrade_Light_Highlights: FloatProperty(
name="Highlights",
description="Adjusts the brightness of the brightest parts of the image",
default=0,
max=1,
min=-1,
subtype="FACTOR",
update=update_Colorgrade_Light_Highlights
)
# Shadows
def update_Colorgrade_Light_Shadows(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Shadows"].nodes["SAC Colorgrade_Light_Shadows"].inputs[0].default_value = settings.Colorgrade_Light_Shadows
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Shadows"].mute = False
if settings.Colorgrade_Light_Shadows == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Shadows"].mute = True
Colorgrade_Light_Shadows: FloatProperty(
name="Shadows",
description="Adjusts the brightness of the darkest parts of the image",
default=0,
max=1,
min=-1,
subtype="FACTOR",
update=update_Colorgrade_Light_Shadows
)
# Whites
def update_Colorgrade_Light_Whites(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Whites"].nodes["SAC Colorgrade_Light_Whites"].inputs[0].default_value = settings.Colorgrade_Light_Whites
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Whites"].mute = False
if settings.Colorgrade_Light_Whites == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Whites"].mute = True
Colorgrade_Light_Whites: FloatProperty(
name="Whites",
description="Adjusts the luminance level of the very brightest parts of the image,\nhelping to set the white point",
default=0,
max=1,
min=-1,
subtype="FACTOR",
update=update_Colorgrade_Light_Whites
)
# Darks
def update_Colorgrade_Light_Darks(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Darks"].nodes["SAC Colorgrade_Light_Darks"].inputs[0].default_value = settings.Colorgrade_Light_Darks
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Darks"].mute = False
if settings.Colorgrade_Light_Darks == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Darks"].mute = True
Colorgrade_Light_Darks: FloatProperty(
name="Darks",
description="Adjusts the luminance level of the very darkest parts of the image,\nhelping to set the black point",
default=0,
max=1,
min=-1,
subtype="FACTOR",
update=update_Colorgrade_Light_Darks
)
# Presets
# Filter Mix
def update_Colorgrade_Filter_Mix(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Filter"].nodes["SAC Colorgrade_Filter_Mix"].inputs[0].default_value = settings.Colorgrade_Filter_Mix
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Filter"].mute = False
if settings.Colorgrade_Filter_Mix == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Filter"].mute = True
Colorgrade_Filter_Mix: FloatProperty(
name="Filter Blend",
description="Adjusts the blend between the original image and the filter",
default=0.5,
max=1,
min=-1,
subtype="FACTOR",
update=update_Colorgrade_Filter_Mix
)
# Extension
def update_Colorgrade_Filter_Extension(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
if settings.Colorgrade_Filter_Extension:
extend = "HORIZONTAL"
else:
extend = "EXTRAPOLATED"
bpy.data.node_groups[".SAC Filter"].nodes["SAC Colorgrade_Filter_Blue"].mapping.extend = extend
bpy.data.node_groups[".SAC Filter"].nodes["SAC Colorgrade_Filter_Green"].mapping.extend = extend
bpy.data.node_groups[".SAC Filter"].nodes["SAC Colorgrade_Filter_Red"].mapping.extend = extend
Colorgrade_Filter_Extension: BoolProperty(
name="Extreme Value Correction",
description="The filter may run into issues at high/low brightness values (above 1 or below 0).\nThis setting eliminates that by clamping the brightness",
default=True,
update=update_Colorgrade_Filter_Extension
)
# Sharpen
def update_Colorgrade_Presets_Sharpen(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Sharpen"].nodes["SAC Colorgrade_Presets_Sharpen"].outputs[0].default_value = settings.Colorgrade_Presets_Sharpen
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Sharpen"].mute = False
if settings.Colorgrade_Presets_Sharpen == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Sharpen"].mute = True
Colorgrade_Presets_Sharpen: FloatProperty(
name="Sharpen",
description="Increases the contrast of edges in the image,\nmaking them appear more defined",
default=0,
max=5,
soft_max=2,
min=-5,
soft_min=-2,
subtype="FACTOR",
update=update_Colorgrade_Presets_Sharpen
)
# Vibrance
def update_Colorgrade_Presets_Vibrance(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Vibrance"].nodes["SAC Colorgrade_Presets_Vibrance"].inputs[2].default_value = settings.Colorgrade_Presets_Vibrance + 1
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Vibrance"].mute = False
if settings.Colorgrade_Presets_Vibrance == 0:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Vibrance"].mute = True
Colorgrade_Presets_Vibrance: FloatProperty(
name="Vibrance",
description="Increases the intensity of the more muted colors in the image,\nwithout affecting the already saturated colors",
default=0,
max=1,
min=-1,
subtype="FACTOR",
update=update_Colorgrade_Presets_Vibrance
)
# Saturation
def update_Colorgrade_Presets_Saturation(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Saturation2"].nodes["SAC Colorgrade_Presets_Saturation"].inputs[2].default_value = settings.Colorgrade_Presets_Saturation
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Saturation2"].mute = False
if settings.Colorgrade_Presets_Saturation == 1:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Saturation2"].mute = True
Colorgrade_Presets_Saturation: FloatProperty(
name="Saturation",
description="Increases or decreases the intensity of colors in an image, from vivid to gray",
default=1,
max=2,
min=0,
subtype="FACTOR",
update=update_Colorgrade_Presets_Saturation
)
# Highlight Tint
def update_Colorgrade_Presets_HighlightTint(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC HighlightTint"].nodes["SAC Colorgrade_Presets_HighlightTint"].inputs[2].default_value[0] = settings.Colorgrade_Presets_HighlightTint[0]
bpy.data.node_groups[".SAC HighlightTint"].nodes["SAC Colorgrade_Presets_HighlightTint"].inputs[2].default_value[1] = settings.Colorgrade_Presets_HighlightTint[1]
bpy.data.node_groups[".SAC HighlightTint"].nodes["SAC Colorgrade_Presets_HighlightTint"].inputs[2].default_value[2] = settings.Colorgrade_Presets_HighlightTint[2]
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC HighlightTint"].mute = False
if (
settings.Colorgrade_Presets_HighlightTint[0] == 1 and
settings.Colorgrade_Presets_HighlightTint[1] == 1 and
settings.Colorgrade_Presets_HighlightTint[2] == 1
):
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC HighlightTint"].mute = True
Colorgrade_Presets_HighlightTint: FloatVectorProperty(
name="Highlight Tint",
description="Alters the color tint specifically in the highlight regions of an image",
min=0.0,
max=1.0,
default=(1.0, 1.0, 1.0),
subtype="COLOR",
update=update_Colorgrade_Presets_HighlightTint
)
# Shadow Tint
def update_Colorgrade_Presets_ShadowTint(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC ShadowTint"].nodes["SAC Colorgrade_Presets_ShadowTint"].inputs[2].default_value[0] = settings.Colorgrade_Presets_ShadowTint[0]
bpy.data.node_groups[".SAC ShadowTint"].nodes["SAC Colorgrade_Presets_ShadowTint"].inputs[2].default_value[1] = settings.Colorgrade_Presets_ShadowTint[1]
bpy.data.node_groups[".SAC ShadowTint"].nodes["SAC Colorgrade_Presets_ShadowTint"].inputs[2].default_value[2] = settings.Colorgrade_Presets_ShadowTint[2]
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC ShadowTint"].mute = False
if (
settings.Colorgrade_Presets_ShadowTint[0] == 1 and
settings.Colorgrade_Presets_ShadowTint[1] == 1 and
settings.Colorgrade_Presets_ShadowTint[2] == 1
):
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC ShadowTint"].mute = True
Colorgrade_Presets_ShadowTint: FloatVectorProperty(
name="Shadow Tint",
description="Alters the color tint specifically in the shadow regions of an image",
min=0.0,
max=1.0,
default=(1.0, 1.0, 1.0),
subtype="COLOR",
update=update_Colorgrade_Presets_ShadowTint
)
# RGB Curves
def update_Colorgrade_Curves_RGB_Intensity(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Curves"].nodes["SAC Colorgrade_Curves_RGB"].inputs[0].default_value = settings.Colorgrade_Curves_RGB_Intensity
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Curves"].mute = False
if (settings.Colorgrade_Curves_RGB_Intensity == 0) and (settings.Colorgrade_Curves_HSV_Intensity == 0):
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Curves"].mute = True
Colorgrade_Curves_RGB_Intensity: FloatProperty(
name="RGB Curves Intensity",
description="Adjusts the blend between the original image and the curves",
default=0,
max=1,
min=0,
subtype="FACTOR",
update=update_Colorgrade_Curves_RGB_Intensity
)
# HSV Curves
def update_Colorgrade_Curves_HSV_Intensity(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Curves"].nodes["SAC Colorgrade_Curves_HSV"].inputs[0].default_value = settings.Colorgrade_Curves_HSV_Intensity
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Curves"].mute = False
if (settings.Colorgrade_Curves_RGB_Intensity == 0) and (settings.Colorgrade_Curves_HSV_Intensity == 0):
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Curves"].mute = True
Colorgrade_Curves_HSV_Intensity: FloatProperty(
name="HSV Curves Intensity",
description="Adjusts the blend between the original image and the curves",
default=0,
max=1,
min=0,
subtype="FACTOR",
update=update_Colorgrade_Curves_HSV_Intensity
)
# Colorwheel
# Lift Brightness
def update_Colorgrade_Colorwheel_Shadows_Brightness(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Colorwheel"].nodes["SAC Colorgrade_Colorwheel_Shadows_Brightness"].inputs[0].default_value = settings.Colorgrade_Colorwheel_Shadows_Brightness
Colorgrade_Colorwheel_Shadows_Brightness: FloatProperty(
name="Shadows Brightness",
description="Adjusts the brightness of the darkest parts of the image",
default=1,
max=2,
min=-2,
soft_min=0,
subtype="FACTOR",
update=update_Colorgrade_Colorwheel_Shadows_Brightness
)
# Lift Intensity
def update_Colorgrade_Colorwheel_Shadows_Intensity(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings
bpy.data.node_groups[".SAC Colorwheel"].nodes["SAC Colorgrade_Colorwheel_Shadows"].inputs[0].default_value = settings.Colorgrade_Colorwheel_Shadows_Intensity
if (settings.Colorgrade_Colorwheel_Highlights_Intensity == 0) and (settings.Colorgrade_Colorwheel_Midtones_Intensity == 0) and (settings.Colorgrade_Colorwheel_Shadows_Intensity == 0):
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Colorwheel"].mute = True
else:
bpy.data.node_groups[".SAC Colorgrade"].nodes["SAC Colorwheel"].mute = False
Colorgrade_Colorwheel_Shadows_Intensity: FloatProperty(
name="Shadows Colorwheel Intensity",
description="Adjusts the blend between the original image and the colorwheel",
default=0,
max=1,
min=-1,
subtype="FACTOR",
update=update_Colorgrade_Colorwheel_Shadows_Intensity
)
# Gamma Brightness
def update_Colorgrade_Colorwheel_Midtones_Brightness(self, context):
scene = bpy.context.scene
settings: SAC_Settings = scene.sac_settings