Closed jzgdev closed 6 years ago
Hi @jzgdev,
Thanks for running the tests. I suspect an issue with your installation. Can you try the resolution in ticket #56, specifically adding the following to your "init.py" file? You can also run that code in your Nuke script editor to test whether that fixes it before going and editing the file.
import cryptomatte_utilities
cryptomatte_utilities.setup_cryptomatte()
Still a few errors but looking much better/working overall:
Here's the output in case you're interested.
import os
import cryptomatte_utilities
os.environ["CRYPTOMATTE_TESTING_SAMPLES"] = "/Users/Alex/Downloads/Cryptomatte-1.2.0/sample_images"
cryptomatte_utilities.setup_cryptomatte()
cryptomatte_utilities.tests.run_nuke_tests()
# Result: test_csv_round_trip (cryptomatte_utilities_tests.CSVParsing) ... ok
test_mm3hash_float (cryptomatte_utilities_tests.CryptoHashing) ... ok
test_big_csv_through_gizmo (cryptomatte_utilities_tests.CSVParsingNuke) ... ok
test_csv_through_gizmo (cryptomatte_utilities_tests.CSVParsingNuke) ... ok
test_bug_still_exists (cryptomatte_utilities_tests.CryptomatteNodePasting)
Tests this bug still exists. We don't want to be running the fix if we don't have to. ... ok
test_paste_with_channelmerge (cryptomatte_utilities_tests.CryptomatteNodePasting)
Tests this bug has been fixed. ... ok
test_clear_button (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_crypto_channel_knobs_type (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_decrypto_basic (cryptomatte_utilities_tests.CryptomatteNukeTests)
Tests both basic decryptomatte, as well as ensuring _scansample() is ... ok
test_decrypto_custom_channel (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_decrypto_matteonly_unpremul (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_decrypto_rmchannels (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_encrypt_bogus_inputs (cryptomatte_utilities_tests.CryptomatteNukeTests)
Tests that when setting up layers, entering the name before pressing "setup layers" ... ok
test_encrypt_bogus_manifest (cryptomatte_utilities_tests.CryptomatteNukeTests) ... FAIL
test_encrypt_channel_knobs_type (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_encrypt_fresh_roundtrip (cryptomatte_utilities_tests.CryptomatteNukeTests) ... FAIL
test_encrypt_layer_forced_update_btn (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_encrypt_layer_lock (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_encrypt_layerselection (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_encrypt_manifest (cryptomatte_utilities_tests.CryptomatteNukeTests)
Gets it into a weird state where it has a manifest but no cryptomatte. ... ok
test_encrypt_matte_name_autofill2 (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_encrypt_merge_operations (cryptomatte_utilities_tests.CryptomatteNukeTests) ... skipped 'Auto failed this test to stop it wrecking the rest of the tests'
test_encrypt_roundtrip (cryptomatte_utilities_tests.CryptomatteNukeTests) ... FAIL
test_encrypt_roundtrip_without_prefix (cryptomatte_utilities_tests.CryptomatteNukeTests) ... FAIL
test_encrypt_setup_layers_numbers (cryptomatte_utilities_tests.CryptomatteNukeTests)
Tests that when setting up layers, entering the name before pressing "setup layers" ... ok
test_keying_blank_matteList (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_keying_clear (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_keying_manual (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_keying_multiselect (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_keying_nothing (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_keying_partial_black (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_keying_single_selection (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_keying_stop_auto_update (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_keying_with_removechannels (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_keying_without_prefix (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_keying_without_preview_channels (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_layer_bogus_manifest (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_layer_forced_update_btn (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_layer_forced_update_func (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_layer_lock (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_layer_selection (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_manifests (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_matte_list_name_modifications (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_matte_list_numeric (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_output_preview (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_output_preview_disabled (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
test_output_preview_multi (cryptomatte_utilities_tests.CryptomatteNukeTests) ... ok
======================================================================
FAIL: test_encrypt_bogus_manifest (cryptomatte_utilities_tests.CryptomatteNukeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 1050, in test_encrypt_bogus_manifest
self.triangle_pkr, "Encryptomatte result not keyable after bogus manifest", alpha=1.0)
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 424, in assertSampleEqual
self._sample_gizmo_assert(pkr, msg, False, **kwargs)
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 421, in _sample_gizmo_assert
self.assertEqual(sample, value, msg_resolved)
AssertionError: Encryptomatte result not keyable after bogus manifest: (alpha) 0.0 vs 1.0
======================================================================
FAIL: test_encrypt_fresh_roundtrip (cryptomatte_utilities_tests.CryptomatteNukeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 1116, in test_encrypt_fresh_roundtrip
self.assertEqual(roto_hash_720, decrypto_hash, ("Alpha did not survive round trip through "
AssertionError: Alpha did not survive round trip through Encryptomatte and then Cryptomatte.
======================================================================
FAIL: test_encrypt_roundtrip (cryptomatte_utilities_tests.CryptomatteNukeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 1025, in test_encrypt_roundtrip
"Encrypto-modified manifest not properly keyable. {0}".format(mlist))
AssertionError: Encrypto-modified manifest not properly keyable. heroflower, set
======================================================================
FAIL: test_encrypt_roundtrip_without_prefix (cryptomatte_utilities_tests.CryptomatteNukeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 1036, in test_encrypt_roundtrip_without_prefix
raise exception
AssertionError: Encrypto-modified manifest not properly keyable. heroflower, set
----------------------------------------------------------------------
Ran 47 tests in 4.604s
FAILED (failures=4, skipped=1)
---------
Failed: CryptomatteNukeTests.test_encrypt_bogus_manifest
Traceback (most recent call last):
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 1050, in test_encrypt_bogus_manifest
self.triangle_pkr, "Encryptomatte result not keyable after bogus manifest", alpha=1.0)
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 424, in assertSampleEqual
self._sample_gizmo_assert(pkr, msg, False, **kwargs)
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 421, in _sample_gizmo_assert
self.assertEqual(sample, value, msg_resolved)
AssertionError: Encryptomatte result not keyable after bogus manifest: (alpha) 0.0 vs 1.0
---------
Failed: CryptomatteNukeTests.test_encrypt_fresh_roundtrip
Traceback (most recent call last):
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 1116, in test_encrypt_fresh_roundtrip
self.assertEqual(roto_hash_720, decrypto_hash, ("Alpha did not survive round trip through "
AssertionError: Alpha did not survive round trip through Encryptomatte and then Cryptomatte.
---------
Failed: CryptomatteNukeTests.test_encrypt_roundtrip
Traceback (most recent call last):
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 1025, in test_encrypt_roundtrip
"Encrypto-modified manifest not properly keyable. {0}".format(mlist))
AssertionError: Encrypto-modified manifest not properly keyable. heroflower, set
---------
Failed: CryptomatteNukeTests.test_encrypt_roundtrip_without_prefix
Traceback (most recent call last):
File "/Users/Alex/.nuke/cryptomatte_utilities_tests.py", line 1036, in test_encrypt_roundtrip_without_prefix
raise exception
AssertionError: Encrypto-modified manifest not properly keyable. heroflower, set
---------
TESTING FAILED: 4 failed, 0 errors. (47 test cases.)
Thanks for the quick reply.
Ok cool. I suspect the remaining errors (all concerning encryptomatte) are really just based on your working resolution being low + imperfectly written tests. We should fix those tests at some point.
Thanks for confirming this was indeed installation issues, hopefully we'll have some time to add a "troubleshooting" button that checks for this stuff soon. (The test suite is more for developers to be sure they didn't break anything).
Here is the output of testing: