I would recommend comparing them as 'longs,' since one of them is already in that form.
If you wanted to compare them in hex, you’d have to convert the metadata value (a string) to a hex, which is honestly easiest to do by converting it to an int first anyway. You’ll also need to convert the opHashes long to hex (easy, but still an extra step). However, if you just compare them as longs, you can just grab the metadata value, call long(metaVal, 16), and be on your way. -Nathan From: robingraham Sent: Wednesday, July 13, 2011 3:52 PM To: [email protected] Subject: [Nuke-python] Re: opHashes() not matching nuke/node_hash Yea Nathan was totally right, the input to the write node was a "input" node. So i put a dummy CC node in there just to grab the hash. Now it works, KINDA. There is one more thing I am trying to figure out. Here is the code I put into a text node to compare input and output hash [metadata nuke/node_hash] [python {hex(nuke.toNode('precompWrite').input(0).opHashes()[0])}] the metadata returns e829kas94j908927 and the ophash returns 0xe829kas94j908927L Notice the ophash has a extra 0x in front and a L at the end. Any idea what this is? It seems to always be the same so I suppose I can just cut off the first two characters and the trailing characters. Seems like the wrong way to fix the problem though. -------------------------------------------------------------------------------- _______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
