On 21/11/11 08:57, Peter Kaufmann wrote:
Hi all,I'm trying to randomize the hash of my Op, to make sure it is evaluated every time. I tried doing this: virtual void append(Hash &hash) { hash.append(rand()); std::cout << "New hash: " << hash.getHash() << std::endl; } When changing the current frame in Nuke, I can see that append() is being called and the hash changes, but then Nuke doesn't always call the 'engine' function as a consequence. It simply uses the previously cached frame.
How are you seeding the rand() call - that's probably the issue - it's generating the same numbers in sequence each time.
However, it would be better to append something totally unique, like the current time - that way you can guarantee that the data won't be in Nuke's cache...
Regards, Peter -- Peter Pearson, Software Engineer The Foundry, 6th Floor, The Communications Building, 48 Leicester Square, London, UK, WC2H 7LT Tel: +44 (0)20 7434 0449 Web: www.thefoundry.co.uk The Foundry Visionmongers Ltd. Registered in England and Wales No: 4642027 _______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
