Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

Encryptomatte.gizmo 22KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  1. #
  2. # Copyright (c) 2014, 2015, 2016, 2017 Psyop Media Company, LLC
  3. # See license.txt
  4. #
  5. version 7.0 v1
  6. Gizmo {
  7. inputs 2
  8. help "Composites new mattes to be added to a set of Cryptomatte-encoded mattes."
  9. addUserKnob {20 Encryptomatte}
  10. addUserKnob {1 matteName l "Matte Name" t "Enter the descriptive name of your matte. If the name is empty, the node does nothing."}
  11. addUserKnob {4 mergeOperation l "Merge Operation" t "Choose a compositing mode to control how your new matte will be merged with the existing set. \n\nThe new matte will be treated like the A input, while the existing mattes will be treated like the B input. The combined result of A and B will be placed over the background matte." M {over under "" ""}}
  12. addUserKnob {7 id l INVISIBLE +INVISIBLE}
  13. addUserKnob {1 idHex l INVISIBLE +INVISIBLE}
  14. addUserKnob {18 previewColor l INVISIBLE +INVISIBLE}
  15. previewColor {0 0 0}
  16. addUserKnob {6 previewColor_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
  17. addUserKnob {1 cryptoLayer l "Layer Selection" t "If there are multiple cryptomattes, this is how you select the layer."}
  18. addUserKnob {6 cryptoLayerLock l "Lock Layer Selection" t "Stops the automatic update of the layer selection." -STARTLINE}
  19. addUserKnob {1 metadataCache l INVISIBLE t "Internal storage of selection between multiple cryptomatte metadata keys." -STARTLINE +INVISIBLE +DO_NOT_WRITE}
  20. addUserKnob {22 forceUpdate l "Force Update" t "Updates the Gizmo based on which channels are available in the input. \n\nThis happens automatically when input changes, when loading the nuke script, or when a new gizmo is created. This is how it deals with differently named channels in the different Cryptomatte layers, and different depths that it's possible to render at. " T "try: \n import cryptomatte_utilities as cu\n cu.update_encryptomatte_gizmo(nuke.thisNode(), True)\nexcept Exception, err:\n import traceback\n nuke.message('''Unable to run Encryptomatte Gizmo update script. This script is necessary for the Cryptomatte system to work properly. Please check that the Cryptomatte python plugin is loaded. \n\nError Traceback: \n\n%s''' % traceback.format_exc())" +STARTLINE}
  21. addUserKnob {6 stopAutoUpdate l "Stop Auto Update" t "Stops the automatic update of this copy of the Gizmo." -STARTLINE}
  22. addUserKnob {41 alphaExpression l INVISIBLE +INVISIBLE T Expression_alpha.expr3}
  23. addUserKnob {1 manifestKey l INVISIBLE +INVISIBLE}
  24. addUserKnob {3 cryptoLayers l Layers t "Number of cryptomatte layers to use."}
  25. cryptoLayers 3
  26. addUserKnob {3 inputCryptoLayers l INVISIBLE +INVISIBLE}
  27. addUserKnob {6 setupLayers l "Setup Layers" t "Set up the Cryptomatte layers if they do not already exist, and remove any extras." -STARTLINE}
  28. addUserKnob {6 newLayer l INVISIBLE +INVISIBLE +STARTLINE}
  29. addUserKnob {41 previewChannel l INVISIBLE +INVISIBLE T Shuffle_previewChannel.in}
  30. addUserKnob {41 in00 l INVISIBLE +INVISIBLE T Shuffle_00.in}
  31. addUserKnob {41 in01 l INVISIBLE +INVISIBLE T Shuffle_01.in}
  32. addUserKnob {41 in02 l INVISIBLE +INVISIBLE T Shuffle_02.in}
  33. addUserKnob {41 in03 l INVISIBLE +INVISIBLE T Shuffle_03.in}
  34. addUserKnob {41 in04 l INVISIBLE +INVISIBLE T Shuffle_04.in}
  35. addUserKnob {41 in05 l INVISIBLE +INVISIBLE T Shuffle_05.in}
  36. addUserKnob {41 in06 l INVISIBLE +INVISIBLE T Shuffle_06.in}
  37. addUserKnob {41 in07 l INVISIBLE +INVISIBLE T Shuffle_07.in}
  38. addUserKnob {41 in08 l INVISIBLE +INVISIBLE T Shuffle_08.in}
  39. addUserKnob {41 in09 l INVISIBLE +INVISIBLE T Shuffle_09.in}
  40. addUserKnob {41 in10 l INVISIBLE +INVISIBLE T Shuffle_10.in}
  41. addUserKnob {41 in11 l INVISIBLE +INVISIBLE T Shuffle_11.in}
  42. addUserKnob {41 removePreviewChannel l INVISIBLE +INVISIBLE T Remove_previewChannel.channels}
  43. addUserKnob {41 remove00 l INVISIBLE +INVISIBLE T Remove_00_03.channels}
  44. addUserKnob {41 remove01 l INVISIBLE +INVISIBLE T Remove_00_03.channels2}
  45. addUserKnob {41 remove02 l INVISIBLE +INVISIBLE T Remove_00_03.channels3}
  46. addUserKnob {41 remove03 l INVISIBLE +INVISIBLE T Remove_00_03.channels4}
  47. addUserKnob {41 remove04 l INVISIBLE +INVISIBLE T Remove_04_07.channels}
  48. addUserKnob {41 remove05 l INVISIBLE +INVISIBLE T Remove_04_07.channels2}
  49. addUserKnob {41 remove06 l INVISIBLE +INVISIBLE T Remove_04_07.channels3}
  50. addUserKnob {41 remove07 l INVISIBLE +INVISIBLE T Remove_04_07.channels4}
  51. addUserKnob {41 addPreviewChannel l INVISIBLE +INVISIBLE T AddChannels_previewChannel.channels}
  52. addUserKnob {41 add00 l INVISIBLE +INVISIBLE T AddChannels_00_03.channels}
  53. addUserKnob {41 add01 l INVISIBLE +INVISIBLE T AddChannels_00_03.channels2}
  54. addUserKnob {41 add02 l INVISIBLE +INVISIBLE T AddChannels_00_03.channels3}
  55. addUserKnob {41 add03 l INVISIBLE +INVISIBLE T AddChannels_00_03.channels4}
  56. addUserKnob {41 add04 l INVISIBLE +INVISIBLE T AddChannels_04_07.channels}
  57. addUserKnob {41 add05 l INVISIBLE +INVISIBLE T AddChannels_04_07.channels2}
  58. addUserKnob {41 add06 l INVISIBLE +INVISIBLE T AddChannels_04_07.channels3}
  59. addUserKnob {41 add07 l INVISIBLE +INVISIBLE T AddChannels_04_07.channels4}
  60. addUserKnob {20 Advanced}
  61. addUserKnob {26 cryptomatteVersion l "Cryptomatte Version" T 1.2.8}
  62. }
  63. Input {
  64. inputs 0
  65. name Input1
  66. xpos -1305
  67. ypos -1346
  68. }
  69. Dot {
  70. name Dot47
  71. xpos -1271
  72. ypos -1287
  73. }
  74. set N6fbc7400 [stack 0]
  75. Dot {
  76. name Dot48
  77. xpos -1491
  78. ypos -1287
  79. }
  80. Remove {
  81. channels none
  82. name Remove_previewChannel
  83. xpos -1525
  84. ypos -1257
  85. }
  86. Remove {
  87. channels none
  88. name Remove_00_03
  89. xpos -1525
  90. ypos -1219
  91. }
  92. Remove {
  93. channels none
  94. name Remove_04_07
  95. xpos -1525
  96. ypos -1181
  97. }
  98. AddChannels {
  99. name AddChannels_previewChannel
  100. xpos -1525
  101. ypos -1120
  102. }
  103. AddChannels {
  104. name AddChannels_00_03
  105. xpos -1525
  106. ypos -1082
  107. }
  108. AddChannels {
  109. name AddChannels_04_07
  110. xpos -1525
  111. ypos -1044
  112. }
  113. set N9419b800 [stack 0]
  114. Dot {
  115. name Dot52
  116. xpos -1379
  117. ypos -1034
  118. }
  119. Shuffle {
  120. in {{{parent.Shuffle_00.in}}}
  121. red black
  122. green white
  123. blue black
  124. alpha black
  125. out {{{parent.Shuffle_00.in}}}
  126. name Shuffle_SetBG
  127. xpos -1413
  128. ypos -989
  129. }
  130. ModifyMetaData {
  131. metadata {
  132. {set "\[value parent.manifestKey]manifest" "\{\}"}
  133. {set "\[value parent.manifestKey]conversion" uint32_to_float32}
  134. {set "\[value parent.manifestKey]hash" MurmurHash3_32}
  135. {set "\[value parent.manifestKey]name" "\[value parent.cryptoLayer]"}
  136. }
  137. name ModifyMetaData1
  138. xpos -1413
  139. ypos -940
  140. }
  141. push $N9419b800
  142. Dot {
  143. name Dot50
  144. xpos -1491
  145. ypos -899
  146. }
  147. Switch {
  148. inputs 2
  149. which {{parent.newLayer}}
  150. name Switch_ResetMetadata
  151. xpos -1413
  152. ypos -903
  153. }
  154. Dot {
  155. name Dot49
  156. xpos -1379
  157. ypos -847
  158. }
  159. push $N6fbc7400
  160. Switch {
  161. inputs 2
  162. which {{parent.setupLayers}}
  163. name Switch_SetupLayers
  164. xpos -1305
  165. ypos -851
  166. }
  167. Dot {
  168. name Dot15
  169. xpos -1271
  170. ypos -693
  171. }
  172. set N9419a000 [stack 0]
  173. Dot {
  174. name Dot14
  175. xpos -1271
  176. ypos 1856
  177. }
  178. set N9949c00 [stack 0]
  179. Dot {
  180. name Dot46
  181. xpos -1271
  182. ypos 1954
  183. }
  184. Input {
  185. inputs 0
  186. name Matte
  187. xpos 455
  188. ypos -820
  189. number 1
  190. }
  191. Dot {
  192. name Dot53
  193. xpos 489
  194. ypos -674
  195. }
  196. set N9949000 [stack 0]
  197. Dot {
  198. name Dot51
  199. xpos 599
  200. ypos -674
  201. }
  202. Shuffle {
  203. red black
  204. green black
  205. blue black
  206. name Shuffle6
  207. xpos 565
  208. ypos 1349
  209. }
  210. Add {
  211. channels rgba
  212. value {{parent.previewColor.r} {parent.previewColor.g} {parent.previewColor.b} 0}
  213. name Add1
  214. xpos 565
  215. ypos 1435
  216. }
  217. Premult {
  218. name Premult1
  219. xpos 565
  220. ypos 1509
  221. }
  222. push $N9419a000
  223. Dot {
  224. name Dot1
  225. xpos -1074
  226. ypos -693
  227. }
  228. set N9971c00 [stack 0]
  229. Dot {
  230. name Dot11
  231. xpos -897
  232. ypos -693
  233. }
  234. set N9971800 [stack 0]
  235. Dot {
  236. name Dot16
  237. xpos 119
  238. ypos -700
  239. }
  240. set N9971400 [stack 0]
  241. Dot {
  242. name Dot41
  243. xpos 261
  244. ypos -700
  245. }
  246. Expression {
  247. channel0 none
  248. channel1 none
  249. channel2 none
  250. channel3 alpha
  251. name Expression_alpha
  252. xpos 227
  253. ypos -682
  254. }
  255. Invert {
  256. channels alpha
  257. name Invert1
  258. xpos 227
  259. ypos -656
  260. }
  261. Dot {
  262. name Dot4
  263. xpos 261
  264. ypos -597
  265. }
  266. set N9970000 [stack 0]
  267. Dot {
  268. name Dot6
  269. xpos 261
  270. ypos 1236
  271. }
  272. set N9991c00 [stack 0]
  273. Dot {
  274. name Dot44
  275. xpos 360
  276. ypos 1236
  277. }
  278. Shuffle {
  279. in none
  280. in2 rgba
  281. alpha alpha2
  282. name Shuffle_previewChannel
  283. xpos 326
  284. ypos 1347
  285. }
  286. Merge2 {
  287. inputs 2
  288. operation {{"\[python nuke.thisKnob().values().index(nuke.thisParent().knob('mergeOperation').value())]"}}
  289. name Merge_AB
  290. xpos 326
  291. ypos 1509
  292. addUserKnob {20 User}
  293. addUserKnob {22 createExpression l "Create Expression" T "nuke.thisNode().knob('operation').setExpression(\"\[python nuke.thisKnob().values().index(nuke.thisParent().knob('mergeOperation').value())]\")" +STARTLINE}
  294. }
  295. set C9991000 [stack 0]
  296. push $N9991c00
  297. Shuffle {
  298. red black
  299. green black
  300. blue black
  301. alpha white
  302. name Shuffle1
  303. xpos 227
  304. ypos 1345
  305. }
  306. Merge2 {
  307. inputs 2
  308. name Merge_Background
  309. xpos 227
  310. ypos 1570
  311. }
  312. set C9990800 [stack 0]
  313. push $N9949000
  314. Shuffle {
  315. red black
  316. green black
  317. blue white
  318. name Shuffle_A
  319. xpos 455
  320. ypos -601
  321. }
  322. Premult {
  323. name Premult3
  324. xpos 455
  325. ypos -548
  326. }
  327. push $N9970000
  328. Shuffle {
  329. red white
  330. green black
  331. blue black
  332. name Shuffle_B
  333. xpos 339
  334. ypos -601
  335. }
  336. Premult {
  337. name Premult2
  338. xpos 339
  339. ypos -549
  340. }
  341. clone $C9991000 {
  342. inputs 2
  343. xpos 455
  344. ypos -478
  345. selected false
  346. }
  347. push $N9971400
  348. Dot {
  349. name Dot42
  350. xpos 119
  351. ypos -507
  352. }
  353. Dot {
  354. name Dot43
  355. xpos 376
  356. ypos -507
  357. }
  358. Shuffle {
  359. red black
  360. green white
  361. blue black
  362. alpha white
  363. name Shuffle_Background
  364. xpos 342
  365. ypos -460
  366. }
  367. clone $C9990800 {
  368. inputs 2
  369. xpos 455
  370. ypos -392
  371. selected true
  372. }
  373. set N99c6400 [stack 0]
  374. Shuffle {
  375. red black
  376. name Shuffle_Under
  377. xpos 511
  378. ypos -283
  379. }
  380. push $N99c6400
  381. Shuffle {
  382. red blue
  383. name Shuffle_Over
  384. xpos 408
  385. ypos -284
  386. }
  387. Switch {
  388. inputs 2
  389. which {{parent.mergeOperation}}
  390. name Switch_MatteExisting
  391. xpos 456
  392. ypos -189
  393. }
  394. Dot {
  395. name Dot19
  396. xpos -3
  397. ypos -185
  398. }
  399. set N99fb800 [stack 0]
  400. Dot {
  401. name Dot29
  402. xpos -73
  403. ypos -185
  404. }
  405. set N99fb400 [stack 0]
  406. Dot {
  407. name Dot28
  408. xpos -183
  409. ypos -185
  410. }
  411. set N99fb000 [stack 0]
  412. push $N9971800
  413. Dot {
  414. name Dot10
  415. xpos -897
  416. ypos -293
  417. }
  418. set N99fac00 [stack 0]
  419. Dot {
  420. name Dot12
  421. xpos -787
  422. ypos -293
  423. }
  424. set N99fa800 [stack 0]
  425. Dot {
  426. name Dot13
  427. xpos -677
  428. ypos -293
  429. }
  430. set N99fa400 [stack 0]
  431. Dot {
  432. name Dot17
  433. xpos -567
  434. ypos -293
  435. }
  436. set N99fa000 [stack 0]
  437. Dot {
  438. name Dot18
  439. xpos -457
  440. ypos -293
  441. }
  442. set N9a1fc00 [stack 0]
  443. Dot {
  444. name Dot22
  445. xpos -347
  446. ypos -293
  447. }
  448. set N9a1f800 [stack 0]
  449. Dot {
  450. name Dot23
  451. xpos -237
  452. ypos -293
  453. }
  454. set N9a1f400 [stack 0]
  455. Shuffle {
  456. in none
  457. name Shuffle_06
  458. xpos -271
  459. ypos -263
  460. }
  461. Multiply {
  462. inputs 1+1
  463. channels {-rgba.red rgba.green -rgba.blue rgba.alpha}
  464. value {1 0 1 0}
  465. maskChannelMask rgba.red
  466. name Multiply1
  467. xpos -271
  468. ypos -127
  469. }
  470. set C9a1ec00 [stack 0]
  471. Dot {
  472. name Dot34
  473. xpos -237
  474. ypos 6
  475. }
  476. set N9a1e800 [stack 0]
  477. push $N99fb400
  478. push $N9a1f400
  479. Dot {
  480. name Dot24
  481. xpos -127
  482. ypos -293
  483. }
  484. Shuffle {
  485. in none
  486. name Shuffle_07
  487. xpos -161
  488. ypos -264
  489. }
  490. clone $C9a1ec00 {
  491. inputs 1+1
  492. xpos -161
  493. ypos -126
  494. selected false
  495. }
  496. push $N99fb800
  497. Shuffle {
  498. red black
  499. blue black
  500. alpha blue
  501. name Shuffle_ForegroundBackground
  502. xpos -37
  503. ypos -126
  504. }
  505. Add {
  506. channels {-rgba.red -rgba.green rgba.blue none}
  507. value {0 0 {parent.id} 0}
  508. name Add2
  509. xpos -37
  510. ypos -78
  511. }
  512. set Na1fb400 [stack 0]
  513. MergeExpression {
  514. inputs 2
  515. temp_name0 orderAr
  516. temp_expr0 "(A.green * (A.red != 0.0) >= A.alpha * (A.blue != 0.0)) + (A.green * (A.red != 0.0) >= B.green) + (A.green * (A.red != 0.0) >= B.alpha)"
  517. temp_name1 orderAb
  518. temp_expr1 "(A.alpha * (A.blue != 0.0) > A.green * (A.red != 0.0)) + (A.alpha >= B.green) + (A.alpha * (A.blue != 0.0) >= B.alpha)"
  519. temp_name2 orderBr
  520. temp_expr2 "(B.green > A.green * (A.red != 0.0)) + (B.green > A.alpha * (A.blue != 0.0)) + (B.green >= B.alpha)"
  521. temp_name3 orderBb
  522. temp_expr3 "(B.alpha > A.green * (A.red != 0.0)) + (B.alpha > B.green) + (B.alpha > A.alpha * (A.blue != 0.0))"
  523. expr0 "(orderAr == 3.0) * A.red + (orderBr == 3.0) * B.red + (orderAb == 3.0) * A.blue + (orderBb == 3.0) * B.blue"
  524. expr1 "(orderAr == 3.0) * A.green * (A.red != 0.0) + (orderBr == 3.0) * B.green + (orderAb == 3.0) * A.alpha * (A.blue != 0.0) + (orderBb == 3.0) * B.alpha"
  525. expr2 "(orderAr == 2.0) * A.red + (orderBr == 2.0) * B.red + (orderAb == 2.0) * A.blue + (orderBb == 2.0) * B.blue"
  526. channel3 alpha
  527. expr3 "(orderAr == 2.0) * A.green * (A.red != 0.0) + (orderBr == 2.0) * B.green + (orderAb == 2.0) * A.alpha * (A.blue != 0.0) + (orderBb == 2.0) * B.alpha"
  528. name MergeExpression7
  529. xpos -161
  530. ypos 4
  531. }
  532. set Ca1fb000 [stack 0]
  533. push $Na1fb400
  534. Dot {
  535. name Dot35
  536. xpos -3
  537. ypos 77
  538. }
  539. Switch {
  540. inputs 2
  541. which {{"parent.cryptoLayers > 7"}}
  542. name Switch_07
  543. xpos -161
  544. ypos 73
  545. disable true
  546. }
  547. set C6f60d200 [stack 0]
  548. set N6f60d200 [stack 0]
  549. MergeExpression {
  550. inputs 2
  551. temp_name0 orderAr
  552. temp_expr0 "(A.green * (A.red != 0.0) >= A.alpha * (A.blue != 0.0)) + (A.green * (A.red != 0.0) >= B.green) + (A.green * (A.red != 0.0) >= B.alpha)"
  553. temp_name1 orderAb
  554. temp_expr1 "(A.alpha * (A.blue != 0.0) > A.green * (A.red != 0.0)) + (A.alpha >= B.green) + (A.alpha * (A.blue != 0.0) >= B.alpha)"
  555. temp_name2 orderBr
  556. temp_expr2 "(B.green > A.green * (A.red != 0.0)) + (B.green > A.alpha * (A.blue != 0.0)) + (B.green >= B.alpha)"
  557. temp_name3 orderBb
  558. temp_expr3 "(B.alpha > A.green * (A.red != 0.0)) + (B.alpha > B.green) + (B.alpha > A.alpha * (A.blue != 0.0))"
  559. expr0 "(orderAr == 1.0) * A.red + (orderBr == 1.0) * B.red + (orderAb == 1.0) * A.blue + (orderBb == 1.0) * B.blue"
  560. expr1 "(orderAr == 1.0) * A.green * (A.red != 0.0) + (orderBr == 1.0) * B.green + (orderAb == 1.0) * A.alpha * (A.blue != 0.0) + (orderBb == 1.0) * B.alpha"
  561. expr2 "(orderAr == 0.0) * A.red + (orderBr == 0.0) * B.red + (orderAb == 0.0) * A.blue + (orderBb == 0.0) * B.blue"
  562. channel3 alpha
  563. expr3 "(orderAr == 0.0) * A.green * (A.red != 0.0) + (orderBr == 0.0) * B.green + (orderAb == 0.0) * A.alpha * (A.blue != 0.0) + (orderBb == 0.0) * B.alpha"
  564. name MergeExpression2
  565. xpos -161
  566. ypos 154
  567. }
  568. set Ca1fa400 [stack 0]
  569. Dot {
  570. name Dot40
  571. xpos -130
  572. ypos 1257
  573. }
  574. push $N99fb000
  575. Dot {
  576. name Dot27
  577. xpos -293
  578. ypos -185
  579. }
  580. set Na22d800 [stack 0]
  581. push $N9a1f800
  582. Shuffle {
  583. in none
  584. name Shuffle_05
  585. xpos -381
  586. ypos -264
  587. }
  588. clone $C9a1ec00 {
  589. inputs 1+1
  590. xpos -381
  591. ypos -127
  592. selected false
  593. }
  594. Dot {
  595. name Dot33
  596. xpos -347
  597. ypos 75
  598. }
  599. set Na22cc00 [stack 0]
  600. push $N9a1e800
  601. push $N6f60d200
  602. clone $Ca1fb000 {
  603. inputs 2
  604. xpos -271
  605. ypos 71
  606. selected false
  607. }
  608. push $N6f60d200
  609. Switch {
  610. inputs 2
  611. which {{"parent.cryptoLayers > 6"}}
  612. name Switch_06
  613. xpos -271
  614. ypos 137
  615. disable true
  616. }
  617. set C6f60cd80 [stack 0]
  618. set N6f60cd80 [stack 0]
  619. clone $Ca1fa400 {
  620. inputs 2
  621. xpos -271
  622. ypos 221
  623. selected false
  624. }
  625. Dot {
  626. name Dot39
  627. xpos -240
  628. ypos 1184
  629. }
  630. push $Na22d800
  631. Dot {
  632. name Dot26
  633. xpos -398
  634. ypos -185
  635. }
  636. set Na255400 [stack 0]
  637. push $N9a1fc00
  638. Shuffle {
  639. in none
  640. name Shuffle_04
  641. xpos -491
  642. ypos -264
  643. }
  644. clone $C9a1ec00 {
  645. inputs 1+1
  646. xpos -491
  647. ypos -128
  648. selected false
  649. }
  650. Dot {
  651. name Dot32
  652. xpos -457
  653. ypos 141
  654. }
  655. set Na254800 [stack 0]
  656. push $Na22cc00
  657. push $N6f60cd80
  658. clone $Ca1fb000 {
  659. inputs 2
  660. xpos -381
  661. ypos 137
  662. selected false
  663. }
  664. push $N6f60cd80
  665. Switch {
  666. inputs 2
  667. which {{"parent.cryptoLayers > 5"}}
  668. name Switch_05
  669. xpos -381
  670. ypos 203
  671. disable true
  672. }
  673. set C6f60c900 [stack 0]
  674. set N6f60c900 [stack 0]
  675. clone $Ca1fa400 {
  676. inputs 2
  677. xpos -381
  678. ypos 288
  679. selected false
  680. }
  681. Dot {
  682. name Dot38
  683. xpos -347
  684. ypos 1120
  685. }
  686. push $Na255400
  687. Dot {
  688. name Dot25
  689. xpos -508
  690. ypos -185
  691. }
  692. set Na289000 [stack 0]
  693. push $N99fa000
  694. Shuffle {
  695. in none
  696. name Shuffle_03
  697. xpos -601
  698. ypos -264
  699. }
  700. clone $C9a1ec00 {
  701. inputs 1+1
  702. xpos -601
  703. ypos -128
  704. selected false
  705. }
  706. Dot {
  707. name Dot31
  708. xpos -567
  709. ypos 207
  710. }
  711. set Na288400 [stack 0]
  712. push $Na254800
  713. push $N6f60c900
  714. clone $Ca1fb000 {
  715. inputs 2
  716. xpos -491
  717. ypos 203
  718. selected false
  719. }
  720. push $N6f60c900
  721. Switch {
  722. inputs 2
  723. which {{"parent.cryptoLayers > 4"}}
  724. name Switch_04
  725. xpos -491
  726. ypos 269
  727. disable true
  728. }
  729. set C6f60c480 [stack 0]
  730. set N6f60c480 [stack 0]
  731. clone $Ca1fa400 {
  732. inputs 2
  733. xpos -491
  734. ypos 353
  735. selected false
  736. }
  737. Dot {
  738. name Dot37
  739. xpos -457
  740. ypos 1054
  741. }
  742. push $Na289000
  743. Dot {
  744. name Dot3
  745. xpos -618
  746. ypos -185
  747. }
  748. set Na2aac00 [stack 0]
  749. push $N99fa400
  750. Shuffle {
  751. in none
  752. name Shuffle_02
  753. xpos -711
  754. ypos -264
  755. }
  756. clone $C9a1ec00 {
  757. inputs 1+1
  758. xpos -711
  759. ypos -128
  760. selected false
  761. }
  762. Dot {
  763. name Dot30
  764. xpos -677
  765. ypos 273
  766. }
  767. set Na2aa000 [stack 0]
  768. push $Na288400
  769. push $N6f60c480
  770. clone $Ca1fb000 {
  771. inputs 2
  772. xpos -601
  773. ypos 269
  774. selected false
  775. }
  776. push $N6f60c480
  777. Switch {
  778. inputs 2
  779. which {{"parent.cryptoLayers > 3"}}
  780. name Switch_03
  781. xpos -601
  782. ypos 337
  783. disable true
  784. }
  785. set C6f60c000 [stack 0]
  786. set N6f60c000 [stack 0]
  787. clone $Ca1fa400 {
  788. inputs 2
  789. xpos -601
  790. ypos 420
  791. selected false
  792. }
  793. Dot {
  794. name Dot36
  795. xpos -567
  796. ypos 978
  797. }
  798. push $Na2aac00
  799. Dot {
  800. name Dot5
  801. xpos -728
  802. ypos -185
  803. }
  804. set Na2dc800 [stack 0]
  805. push $N99fa800
  806. Shuffle {
  807. in none
  808. name Shuffle_01
  809. xpos -821
  810. ypos -263
  811. }
  812. clone $C9a1ec00 {
  813. inputs 1+1
  814. xpos -821
  815. ypos -129
  816. selected false
  817. }
  818. Dot {
  819. name Dot9
  820. xpos -787
  821. ypos 339
  822. }
  823. set N4b26bc00 [stack 0]
  824. push $Na2aa000
  825. push $N6f60c000
  826. clone $Ca1fb000 {
  827. inputs 2
  828. xpos -711
  829. ypos 337
  830. selected false
  831. }
  832. push $N6f60c000
  833. Switch {
  834. inputs 2
  835. which {{"parent.cryptoLayers > 2"}}
  836. name Switch_02
  837. xpos -711
  838. ypos 411
  839. }
  840. set C4b27da80 [stack 0]
  841. set N4b27da80 [stack 0]
  842. clone $Ca1fa400 {
  843. inputs 2
  844. xpos -711
  845. ypos 489
  846. selected false
  847. }
  848. Dot {
  849. name Dot21
  850. xpos -677
  851. ypos 913
  852. }
  853. push $Na2dc800
  854. Dot {
  855. name Dot7
  856. xpos -838
  857. ypos -185
  858. }
  859. push $N99fac00
  860. Shuffle {
  861. in none
  862. black red
  863. white green
  864. red2 blue
  865. green2 alpha
  866. name Shuffle_00
  867. xpos -931
  868. ypos -262
  869. }
  870. clone $C9a1ec00 {
  871. inputs 1+1
  872. xpos -931
  873. ypos -129
  874. selected false
  875. }
  876. Dot {
  877. name Dot8
  878. xpos -897
  879. ypos 409
  880. }
  881. set N4b299800 [stack 0]
  882. push $N4b26bc00
  883. push $N4b27da80
  884. clone $Ca1fb000 {
  885. inputs 2
  886. xpos -821
  887. ypos 406
  888. selected false
  889. }
  890. push $N4b27da80
  891. Switch {
  892. inputs 2
  893. which {{"parent.cryptoLayers > 1"}}
  894. name Switch_01
  895. xpos -821
  896. ypos 475
  897. }
  898. set C4b27d600 [stack 0]
  899. set N4b27d600 [stack 0]
  900. clone $Ca1fa400 {
  901. inputs 2
  902. xpos -821
  903. ypos 561
  904. selected false
  905. }
  906. Dot {
  907. name Dot20
  908. xpos -787
  909. ypos 828
  910. }
  911. push $N4b299800
  912. push $N4b27d600
  913. clone $Ca1fb000 {
  914. inputs 2
  915. xpos -931
  916. ypos 475
  917. selected false
  918. }
  919. push $N4b27d600
  920. Switch {
  921. inputs 2
  922. which {{"parent.cryptoLayers > 0"}}
  923. name Switch_00
  924. xpos -931
  925. ypos 536
  926. }
  927. set C4b27d180 [stack 0]
  928. push $N9971c00
  929. Dot {
  930. name Dot2
  931. xpos -1074
  932. ypos 802
  933. }
  934. set N4b2c5800 [stack 0]
  935. ShuffleCopy {
  936. inputs 2
  937. alpha alpha2
  938. black red
  939. white green
  940. red2 blue
  941. green2 alpha
  942. out2 {{{parent.Shuffle_00.in}}}
  943. name ShuffleCopy_00
  944. xpos -931
  945. ypos 798
  946. addUserKnob {20 User}
  947. addUserKnob {22 setExpression l "Set Expression" T "nuke.thisNode().knob('out2').setExpression('\[value parent.in00]')" +STARTLINE}
  948. }
  949. push $N4b2c5800
  950. clone $C4b27d180 {
  951. inputs 2
  952. xpos -1108
  953. ypos 857
  954. selected false
  955. }
  956. set N4b27cd00 [stack 0]
  957. ShuffleCopy {
  958. inputs 2
  959. alpha alpha2
  960. black red
  961. white green
  962. red2 blue
  963. green2 alpha
  964. out2 {{{parent.Shuffle_01.in}}}
  965. name ShuffleCopy_01
  966. xpos -931
  967. ypos 857
  968. }
  969. push $N4b27cd00
  970. clone $C4b27d600 {
  971. inputs 2
  972. xpos -1108
  973. ypos 910
  974. selected false
  975. }
  976. set N4b27c880 [stack 0]
  977. ShuffleCopy {
  978. inputs 2
  979. alpha alpha2
  980. black red
  981. white green
  982. red2 blue
  983. green2 alpha
  984. out2 {{{parent.Shuffle_02.in}}}
  985. name ShuffleCopy_02
  986. xpos -931
  987. ypos 909
  988. }
  989. push $N4b27c880
  990. clone $C4b27da80 {
  991. inputs 2
  992. xpos -1108
  993. ypos 974
  994. selected false
  995. }
  996. set N4b27c400 [stack 0]
  997. ShuffleCopy {
  998. inputs 2
  999. alpha alpha2
  1000. black red
  1001. white green
  1002. red2 blue
  1003. green2 alpha
  1004. out2 {{{parent.Shuffle_03.in}}}
  1005. name ShuffleCopy_03
  1006. xpos -931
  1007. ypos 974
  1008. }
  1009. push $N4b27c400
  1010. clone $C6f60c000 {
  1011. inputs 2
  1012. xpos -1108
  1013. ypos 1053
  1014. selected false
  1015. }
  1016. set N4b27bf80 [stack 0]
  1017. ShuffleCopy {
  1018. inputs 2
  1019. alpha alpha2
  1020. black red
  1021. white green
  1022. red2 blue
  1023. green2 alpha
  1024. out2 {{{parent.Shuffle_04.in}}}
  1025. name ShuffleCopy_04
  1026. xpos -931
  1027. ypos 1050
  1028. }
  1029. push $N4b27bf80
  1030. clone $C6f60c480 {
  1031. inputs 2
  1032. xpos -1108
  1033. ypos 1120
  1034. selected false
  1035. }
  1036. set N4b27bb00 [stack 0]
  1037. ShuffleCopy {
  1038. inputs 2
  1039. alpha alpha2
  1040. black red
  1041. white green
  1042. red2 blue
  1043. green2 alpha
  1044. out2 {{{parent.Shuffle_05.in}}}
  1045. name ShuffleCopy_05
  1046. xpos -931
  1047. ypos 1116
  1048. }
  1049. push $N4b27bb00
  1050. clone $C6f60c900 {
  1051. inputs 2
  1052. xpos -1108
  1053. ypos 1185
  1054. selected false
  1055. }
  1056. set N4b27b680 [stack 0]
  1057. ShuffleCopy {
  1058. inputs 2
  1059. alpha alpha2
  1060. black red
  1061. white green
  1062. red2 blue
  1063. green2 alpha
  1064. out2 {{{parent.Shuffle_06.in}}}
  1065. name ShuffleCopy_06
  1066. xpos -931
  1067. ypos 1180
  1068. }
  1069. push $N4b27b680
  1070. clone $C6f60cd80 {
  1071. inputs 2
  1072. xpos -1108
  1073. ypos 1256
  1074. selected false
  1075. }
  1076. set N4b27b200 [stack 0]
  1077. ShuffleCopy {
  1078. inputs 2
  1079. alpha alpha2
  1080. black red
  1081. white green
  1082. red2 blue
  1083. green2 alpha
  1084. out2 {{{parent.Shuffle_07.in}}}
  1085. name ShuffleCopy_07
  1086. xpos -931
  1087. ypos 1253
  1088. }
  1089. push $N4b27b200
  1090. clone $C6f60d200 {
  1091. inputs 2
  1092. xpos -1108
  1093. ypos 1328
  1094. selected false
  1095. }
  1096. Dot {
  1097. name Dot45
  1098. xpos -1074
  1099. ypos 1646
  1100. }
  1101. ShuffleCopy {
  1102. inputs 2
  1103. alpha alpha2
  1104. black red
  1105. white green
  1106. red2 blue
  1107. green2 alpha
  1108. out2 {{{parent.Shuffle_previewChannel.in}}}
  1109. name ShuffleCopy_previewChannel
  1110. xpos 227
  1111. ypos 1642
  1112. }
  1113. ModifyMetaData {
  1114. metadata {
  1115. {set "\[value parent.manifestKey]manifest" "\[python -execlocal import cryptomatte_utilities\\nret=cryptomatte_utilities.encryptomatte_add_manifest_id()]"}
  1116. }
  1117. name ModifyMetaData2
  1118. xpos 227
  1119. ypos 1703
  1120. }
  1121. push $N9949c00
  1122. Switch {
  1123. inputs 2
  1124. which {{parent.id!=0.0}}
  1125. name Switch1
  1126. xpos 227
  1127. ypos 1852
  1128. }
  1129. Switch {
  1130. inputs 2
  1131. which {{"\[python (nuke.thisParent().input(0)\\ is\\ None)\\ and\\ (nuke.thisParent().input(1)\\ is\\ None)\\ and\\ not\\ nuke.thisParent()\\\['setupLayers'\\].value()]"}}
  1132. name Switch2
  1133. xpos 227
  1134. ypos 1950
  1135. }
  1136. Output {
  1137. name Output1
  1138. xpos 227
  1139. ypos 2051
  1140. }
  1141. end_group