Also, you'll have the same problem with gizmos and groups, because
their last node will be an "Output" node, and running opHashes() on an
Output node also returns an empty list.

So, as Nathan suggested, you could crawl up the tree until you find a
node whose opHashes() method gives you something useful. But make sure
you don't skip gizmos or groups, but go up their internal tree
instead.



On Wed, Jul 13, 2011 at 3:26 PM, Nathan Rusch <[email protected]> wrote:
> I’m guessing the input to your Write is an Input or Dot node. You’ll need to
> resolve to the next node in the tree that actually contains an Op.
>
> Once you get that node, you should just be able to call
> hex(<node>.opHashes()[0]), as the opHashes list will already contain long
> ints.
>
> -Nathan
>
>
> From: robingraham
> Sent: Wednesday, July 13, 2011 3:16 PM
> To: [email protected]
> Subject: [Nuke-python] Re: opHashes() not matching nuke/node_hash
>
> nuke.toNode('precompWrite').input(0).opHashes()
>
> so this is the code I am using to get the hash from a write node but it is
> returning []. What am I doing wrong? I assume once I get this working I can
> just put hex(int( ) ) around it and I should get something that I can
> compare to the metadata.
>
> ________________________________
> _______________________________________________
> 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
>
>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to