Psyop / Cryptomatte

Cryptomatte Nuke plugin, Fusion plugin, sample images, and specification
BSD 3-Clause "New" or "Revised" License
632 stars 151 forks source link

[Nuke] Copying a locked Cryptomatte node raises ValueError #128

Closed elveatles closed 4 years ago

elveatles commented 4 years ago

Copying and pasting a Cryptomatte node that has "Lock Layer Selection" checked causes a ValueError to be raised from the cryptomatte_utilities.py file.

Tested with Cryptomatte 1.2.6.

Steps to reproduce:

  1. Create a Cryptomatte node
  2. Plug its input into a Read node (VRay render in my case)
  3. Choose LayerSelection (VRayCryptomatte_Layers)
  4. Check "Lock Layer Selection". This needs to be checked or you won't get the error.
  5. Copy/paste the Cryptomatte node
  6. Look at the Nuke Script Editor to see the traceback.

Here's the traceback I see.

Traceback (most recent call last):

  File "C:/Program Files/Nuke11.3v5/plugins\nuke\callbacks.py", line 127, in knobChanged

    _doCallbacks(knobChangeds)

  File "C:/Program Files/Nuke11.3v5/plugins\nuke\callbacks.py", line 46, in _doCallbacks

    f[0](*f[1],**f[2])

  File "C:\Users\carlson\Documents\nuke_stuff\Cryptomatte\nuke\cryptomatte_utilities.py", line 44, in <lambda>

    nuke.thisNode(), nuke.thisKnob()), nodeClass='Cryptomatte')

  File "C:\Users\carlson\Documents\nuke_stuff\Cryptomatte\nuke\cryptomatte_utilities.py", line 470, in cryptomatte_knob_changed_event

    knob.setValue(knob.values().index(node.knob('cryptoLayer').value()))

ValueError: 'VRayCryptomatte_Layers' is not in list
jonahfriedman commented 4 years ago

This will be fixed in 1.2.8. Thanks for reporting!

elveatles commented 4 years ago

Thank you for the fix!