Package nukescripts :: Module camerapresets
[hide private]
[frames] | no frames]

Source Code for Module nukescripts.camerapresets

  1  # 
  2  # Camera preset class for cameraTracker film backs 
  3  # 
  4   
5 -class CameraFilmBackPresets:
6 """A simple container object for holding the label and film back data of a camera.""" 7
8 - def __init__(self):
9 """Initialise by adding all of our presets.""" 10 11 self.presets = [] 12 13 self.addPreset("Custom", {'filmBackSize': '36 24'}) 14 self.addPreset("Film/35mm/2 perf 1.78", {'filmBackSize': '15.6 8.76'}) 15 self.addPreset("Film/35mm/2 perf 2.40 v1", {'filmBackSize': '22.05 9.27'}) 16 self.addPreset("Film/35mm/2 perf 2.40 v2", {'filmBackSize': '20.96 8.76'}) 17 self.addPreset("Film/35mm/3 perf 1.78", {'filmBackSize': '24.92 13.87'}) 18 self.addPreset("Film/35mm/4 perf 1.33 TV Safe", {'filmBackSize': '20.12 15.09'}) 19 self.addPreset("Film/35mm/4 perf 1.33 Large TV Transmit", {'filmBackSize': '21.13 15.85'}) 20 self.addPreset("Film/35mm/4 perf 1.78", {'filmBackSize': '24 13.5'}) 21 self.addPreset("Film/35mm/4 perf 1.85 Extract", {'filmBackSize': '24 12.98'}) 22 self.addPreset("Film/35mm/4 perf 1.85 Projection", {'filmBackSize': '20.96 11.33'}) 23 self.addPreset("Film/35mm/4 perf 2.40 Anamorphic Projection", {'filmBackSize': '20.96 17.53'}) 24 self.addPreset("Film/35mm/4 perf 2.40 Extract", {'filmBackSize': '20.96 10.4'}) 25 self.addPreset("Film/16mm 1.37", {'filmBackSize': '10.26 7.49'}) 26 self.addPreset("Film/Super 16mm 1.66", {'filmBackSize': '12.52 7.41'}) 27 self.addPreset("Film/Super 16mm 1.85", {'filmBackSize': '12.52 7.77'}) 28 self.addPreset("Film/35mm Full Frame", {'filmBackSize': '36 18.3'}) 29 self.addPreset("Film/65mm 2.20", {'filmBackSize': '52.63 23.01'}) 30 self.addPreset("Film/Panavision Super 70mm", {'filmBackSize': '48.56 22.1'}) 31 self.addPreset("Film/70mm Extract 2.40", {'filmBackSize': '48.56 20.31'}) 32 self.addPreset("Film/70mm Imax", {'filmBackSize': '70 48.5'}) 33 self.addPreset("Film/Academy", {'filmBackSize': '21.95 16'}) 34 self.addPreset("Film/Super35", {'filmBackSize': '24.89 18.66'}) 35 self.addPreset("Arri/D21 1.33", {'filmBackSize': '23.76 17.82'}) 36 self.addPreset("Arri/D21 1.78", {'filmBackSize': '23.76 13.37'}) 37 self.addPreset("Arri/D21 1.85", {'filmBackSize': '23.76 12.84'}) 38 self.addPreset("Arri/D21 2.40", {'filmBackSize': '23.76 9.94'}) 39 self.addPreset("Arri/Alexa 16:9 1.78", {'filmBackSize': '23.76 13.37'}) 40 self.addPreset("Arri/Alexa 16:9 1.85", {'filmBackSize': '23.76 12.84'}) 41 self.addPreset("Arri/Alexa 16:9 2.39 Scope 2x", {'filmBackSize': '15.97 13.37'}) 42 self.addPreset("Arri/Alexa 16:9 2.39 Flat", {'filmBackSize': '23.76 9.95'}) 43 self.addPreset("Arri/Alexa 4:3 1.33", {'filmBackSize': '23.76 17.82'}) 44 self.addPreset("Arri/Alexa 4:3 1.78", {'filmBackSize': '23.76 13.37'}) 45 self.addPreset("Arri/Alexa 4:3 1.85", {'filmBackSize': '23.76 12.84'}) 46 self.addPreset("Arri/Alexa 4:3 2.39 Scope 2x", {'filmBackSize': '21.30 17.82'}) 47 self.addPreset("Arri/Alexa 4:3 2.39 Flat", {'filmBackSize': '23.76 9.95'}) 48 self.addPreset("Black Magic/Pocket Cinema Camera", {'filmBackSize': '12.48 7.02'}) 49 self.addPreset("Black Magic/Cinema Camera 2k", {'filmBackSize': '15.81 8.88'}) 50 self.addPreset("Black Magic/Production Camera 4k", {'filmBackSize': '21.12 11.88'}) 51 self.addPreset("Canon/DSLR/M Still", {'filmBackSize': '22.3 14.9'}) 52 self.addPreset("Canon/DSLR/M Video", {'filmBackSize': '22.3 12.54'}) 53 self.addPreset("Canon/DSLR/1D MKIV Still", {'filmBackSize': '27.9 18.6'}) 54 self.addPreset("Canon/DSLR/1D MKIV Video", {'filmBackSize': '27.9 15.69'}) 55 self.addPreset("Canon/DSLR/1DX Still", {'filmBackSize': '36 24'}) 56 self.addPreset("Canon/DSLR/1DX Video", {'filmBackSize': '35.8 20.14'}) 57 self.addPreset("Canon/DSLR/5D MKII+III Still", {'filmBackSize': '36 24'}) 58 self.addPreset("Canon/DSLR/5D MKII+III Video", {'filmBackSize': '35.8 20.14'}) 59 self.addPreset("Canon/DSLR/6D Still", {'filmBackSize': '36 24'}) 60 self.addPreset("Canon/DSLR/6D Video", {'filmBackSize': '35.8 20.14'}) 61 self.addPreset("Canon/DSLR/7D Still", {'filmBackSize': '22.3 14.9'}) 62 self.addPreset("Canon/DSLR/7D Video", {'filmBackSize': '22.3 12.54'}) 63 self.addPreset("Canon/DSLR/60D Still", {'filmBackSize': '22.3 14.9'}) 64 self.addPreset("Canon/DSLR/60D Video", {'filmBackSize': '22.3 12.54'}) 65 self.addPreset("Canon/DSLR/70D Still", {'filmBackSize': '22.5 15.0'}) 66 self.addPreset("Canon/DSLR/70D Video", {'filmBackSize': '22.5 12.7'}) 67 self.addPreset("Canon/DSLR/Rebel 550D 600D 650D T2i T3i T4i Still", {'filmBackSize': '22.3 14.9'}) 68 self.addPreset("Canon/DSLR/Rebel 550D 600D 650D T2i T3i T4i Video", {'filmBackSize': '22.3 12.54'}) 69 self.addPreset("Canon/1DC Still", {'filmBackSize': '36 24'}) 70 self.addPreset("Canon/1DC Video", {'filmBackSize': '35.8 20.14'}) 71 self.addPreset("Canon/C100", {'filmBackSize': '24.6 13.8'}) 72 self.addPreset("Canon/C300", {'filmBackSize': '24.6 13.8'}) 73 self.addPreset("Canon/C500", {'filmBackSize': '24.6 13.8'}) 74 self.addPreset("Canon/XL1 4:3", {'filmBackSize': '4.82 3.64'}) 75 self.addPreset("Canon/XL1 16:9", {'filmBackSize': '4.82 2.73'}) 76 self.addPreset("Canon/XL2 4:3", {'filmBackSize': '4.8 3.6'}) 77 self.addPreset("Canon/XL2 16:9", {'filmBackSize': '6.4 3.6'}) 78 self.addPreset("Nikon/DSLR/D4 FX Still", {'filmBackSize': '36 23.9'}) 79 self.addPreset("Nikon/DSLR/D4 1.2x Still", {'filmBackSize': '30 20'}) 80 self.addPreset("Nikon/DSLR/D4 DX Still", {'filmBackSize': '24 16'}) 81 self.addPreset("Nikon/DSLR/D4 5:4 Still", {'filmBackSize': '30 24'}) 82 self.addPreset("Nikon/DSLR/D90 Still", {'filmBackSize': '23.6 15.8'}) 83 self.addPreset("Nikon/DSLR/D300S Still", {'filmBackSize': '23.6 15.8'}) 84 self.addPreset("Nikon/DSLR/D600 FX Still", {'filmBackSize': '35.9 24'}) 85 self.addPreset("Nikon/DSLR/D600 DX Still", {'filmBackSize': '24 16'}) 86 self.addPreset("Nikon/DSLR/D700 FX Still", {'filmBackSize': '36 23.9'}) 87 self.addPreset("Nikon/DSLR/D700 DX Still", {'filmBackSize': '24 16'}) 88 self.addPreset("Nikon/DSLR/D800 FX Still", {'filmBackSize': '35.9 24'}) 89 self.addPreset("Nikon/DSLR/D800 1.2x Still", {'filmBackSize': '30 20'}) 90 self.addPreset("Nikon/DSLR/D800 DX Still", {'filmBackSize': '24 16'}) 91 self.addPreset("Nikon/DSLR/D800 5:4 Still", {'filmBackSize': '30 24'}) 92 self.addPreset("Nikon/DSLR/D3100 DX Still", {'filmBackSize': '23.1 15.4'}) 93 self.addPreset("Nikon/DSLR/D3200 DX Still", {'filmBackSize': '23.2 15.4'}) 94 self.addPreset("Nikon/DSLR/D5100 DX Still", {'filmBackSize': '23.6 15.6'}) 95 self.addPreset("Nikon/DSLR/D7000 DX Still", {'filmBackSize': '23.6 15.6'}) 96 self.addPreset("Phantom/65 4k", {'filmBackSize': '52.1 31.04'}) #4096x2440 97 self.addPreset("Phantom/65 4k 16:9", {'filmBackSize': '52.1 29.31'}) #4096x2304 98 self.addPreset("Phantom/65 UHD", {'filmBackSize': '48.84 27.47'}) #3840x2160 99 self.addPreset("Phantom/65 2k Square", {'filmBackSize': '26.05 26.05'}) #2048x2048 100 self.addPreset("Phantom/65 2k 1.85", {'filmBackSize': '26.05 14.04'}) #2048x1104 101 self.addPreset("Phantom/65 2k 2.35", {'filmBackSize': '26.05 11.09'}) #2048x872 102 self.addPreset("Phantom/65 1080p", {'filmBackSize': '24.42 13.74'}) 103 self.addPreset("Phantom/65 1632x1200", {'filmBackSize': '20.76 15.26'}) 104 self.addPreset("Phantom/65 720p", {'filmBackSize': '16.28 9.16'}) 105 self.addPreset("Phantom/65 1152x896", {'filmBackSize': '14.65 11.4'}) 106 self.addPreset("Phantom/65 800x600", {'filmBackSize': '10.18 7.63'}) 107 self.addPreset("Phantom/65 640x480", {'filmBackSize': '8.14 6.11'}) 108 self.addPreset("Phantom/65 512x512", {'filmBackSize': '6.51 6.51'}) 109 self.addPreset("Phantom/65 256x256", {'filmBackSize': '3.26 3.26'}) 110 self.addPreset("Phantom/Flex 2.5k", {'filmBackSize': '25.6 15.46'}) 111 self.addPreset("Phantom/Flex 1080p", {'filmBackSize': '18.55 10.43'}) 112 self.addPreset("Phantom/Flex 720p", {'filmBackSize': '12.37 6.96'}) 113 self.addPreset("Phantom/Flex 640x480", {'filmBackSize': '6.18 4.64'}) 114 self.addPreset("Phantom/HD Gold 2k Square", {'filmBackSize': '25.6 25.6'}) 115 self.addPreset("Phantom/HD Gold 2k 1.85", {'filmBackSize': '25.6 13.8'}) 116 self.addPreset("Phantom/HD Gold 2k 2.35", {'filmBackSize': '25.6 10.9'}) 117 self.addPreset("Phantom/HD Gold 1080p", {'filmBackSize': '24 13.5'}) 118 self.addPreset("Phantom/HD Gold 720p", {'filmBackSize': '16 9'}) 119 self.addPreset("Phantom/HD Gold 1152x896", {'filmBackSize': '14.4 11.2'}) 120 self.addPreset("Phantom/HD Gold 800x600", {'filmBackSize': '10 7.5'}) 121 self.addPreset("Phantom/HD Gold 640x480", {'filmBackSize': '8 6'}) 122 self.addPreset("Phantom/HD Gold 512x512", {'filmBackSize': '6.4 6.4'}) 123 self.addPreset("Red/One/4.5k", {'filmBackSize': '24.19 10.37'}) 124 self.addPreset("Red/One/4k 16:9", {'filmBackSize': '22.12 12.44'}) 125 self.addPreset("Red/One/4k 2:1", {'filmBackSize': '22.12 11.06'}) 126 self.addPreset("Red/One/4k HD", {'filmBackSize': '20.74 11.66'}) 127 self.addPreset("Red/One/4k Anamorphic", {'filmBackSize': '14.93 12.44'}) 128 self.addPreset("Red/One/3k 16:9", {'filmBackSize': '16.59 9.33'}) 129 self.addPreset("Red/One/3k 2:1", {'filmBackSize': '16.65 8.29'}) 130 self.addPreset("Red/One/2k 16:9", {'filmBackSize': '11.06 6.22'}) 131 self.addPreset("Red/One/2k 2:1", {'filmBackSize': '11.06 5.53'}) 132 self.addPreset("Red/Epic/5k", {'filmBackSize': '27.648 14.58'}) 133 self.addPreset("Red/Epic/5k 2:1", {'filmBackSize': '27.648 13.824'}) 134 self.addPreset("Red/Epic/5k HD", {'filmBackSize': '25.920 14.58'}) 135 self.addPreset("Red/Epic/5k ANA", {'filmBackSize': '17.798 14.58'}) 136 self.addPreset("Red/Epic/5k WS", {'filmBackSize': '27.648 11.664'}) 137 self.addPreset("Red/Epic/4k", {'filmBackSize': '22.118 11.664'}) 138 self.addPreset("Red/Epic/4k HD", {'filmBackSize': '20.736 11.664'}) 139 self.addPreset("Red/Epic/3k", {'filmBackSize': '16.589 8.748'}) 140 self.addPreset("Red/Epic/3k HD", {'filmBackSize': '15.552 8.748'}) 141 self.addPreset("Red/Epic/2k", {'filmBackSize': '11.059 5.832'}) 142 self.addPreset("Red/Epic/2k HD", {'filmBackSize': '10.368 5.832'}) 143 self.addPreset("Red/Epic/2k WS", {'filmBackSize': '11.059 4.612'}) 144 self.addPreset("Red/Epic/1k HD", {'filmBackSize': '6.912 3.888'}) 145 self.addPreset("Red/Epic/1k WS", {'filmBackSize': '6.912 2.592'}) 146 self.addPreset("Red/Epic Dragon/6k Full", {'filmBackSize': '30.7 15.8'}) 147 self.addPreset("Red/Epic Dragon/6k FF3", {'filmBackSize': '36 18.56'}) 148 self.addPreset("Red/Epic Dragon/5.5k Full", {'filmBackSize': '27.7 14.6'}) 149 self.addPreset("Red/Epic Dragon/5k Full", {'filmBackSize': '25.58 13.49'}) 150 self.addPreset("Red/Epic Dragon/4k Full", {'filmBackSize': '20.47 10.79'}) 151 self.addPreset("Red/Epic Dragon/3k Full", {'filmBackSize': '15.35 8.09'}) 152 self.addPreset("Red/Epic Dragon/2k Full", {'filmBackSize': '10.25 5.4'}) 153 self.addPreset("Red/Epic Dragon/1k Full", {'filmBackSize': '6.4 3.6'}) 154 self.addPreset("Sony/DSLR/APS-C A37", {'filmBackSize': '23.5 15.6'}) 155 self.addPreset("Sony/DSLR/APS-C A57", {'filmBackSize': '23.5 15.6'}) 156 self.addPreset("Sony/DSLR/APS-C A58", {'filmBackSize': '23.5 15.6'}) 157 self.addPreset("Sony/DSLR/APS-C A65", {'filmBackSize': '23.5 15.6'}) 158 self.addPreset("Sony/DSLR/APS-C A77", {'filmBackSize': '23.5 15.6'}) 159 self.addPreset("Sony/DSLR/APS-C A3000", {'filmBackSize': '23.5 15.6'}) 160 self.addPreset("Sony/DSLR/Full Frame A99", {'filmBackSize': '35.8 23.9'}) 161 self.addPreset("Sony/DSLR/Mirrorless A7", {'filmBackSize': '35.8 23.9'}) 162 self.addPreset("Sony/DSLR/NEX-6", {'filmBackSize': '23.5 15.6'}) 163 self.addPreset("Sony/DSLR/SLT-A37", {'filmBackSize': '23.5 15.6'}) 164 self.addPreset("Sony/DSLR/SLT-A57", {'filmBackSize': '23.5 15.6'}) 165 self.addPreset("Sony/DSLR/SLT-A99", {'filmBackSize': '35.8 23.8'}) 166 self.addPreset("Sony/DSR-400", {'filmBackSize': '8.8 6.6'}) 167 self.addPreset("Sony/EX1", {'filmBackSize': '6.97 3.92'}) 168 self.addPreset("Sony/F3", {'filmBackSize': '24.7 13.1'}) 169 self.addPreset("Sony/FS100U", {'filmBackSize': '23.6 13.3'})#Exmor Super35 CMOS Sensor 170 self.addPreset("Sony/FS700", {'filmBackSize': '23.6 13.3'})#Exmor Super35 CMOS Sensor 171 self.addPreset("Sony/F35 1.78", {'filmBackSize': '23.62 13.28'}) 172 self.addPreset("Sony/F35 1.85", {'filmBackSize': '22.45 12.14'}) 173 self.addPreset("Sony/F35 2.39", {'filmBackSize': '22.45 9.4'}) 174 self.addPreset("Sony/F55", {'filmBackSize': '24 12.7'}) 175 self.addPreset("Sony/F5", {'filmBackSize': '24 12.7'}) 176 self.addPreset("Sony/F65", {'filmBackSize': '24.7 13.1'})
177
178 - def addPreset(self, label, filmBackDict):
179 """Parse a dict for the camera aperture size and add to the list.""" 180 181 haperture, vaperture = [float(x) for x in filmBackDict['filmBackSize'].split()] 182 self.presets.append( (label, haperture, vaperture) )
183 184 # 185 # Global preset object initialisation 186 # 187 188 _gFilmBackPresets = CameraFilmBackPresets() 189 190 # 191 # Utility functions for accessing global CameraFilmBackPreset member variables. 192 # 193
194 -def getLabels():
195 """Returns the list of preset labels for display in the knob.""" 196 return [preset[0] for preset in _gFilmBackPresets.presets]
197
198 -def getFilmBackSize(index):
199 """Returns the film back size for the given index.""" 200 return [_gFilmBackPresets.presets[index][1], _gFilmBackPresets.presets[index][2]];
201
202 -def addPreset(label, haperture, vaperture):
203 """Adds a preset to the global list of presets.""" 204 _gFilmBackPresets.addPreset(label, {'filmBackSize': str(haperture)+' '+str(vaperture)})
205