Johannes,
On Oct 13, 2014, at 3:12 PM, Johannes Hezer <[email protected]> wrote:
> Hi Rich,
>
> lame answer, but callbacks seem to be the way to go here :-)
> At least I cannot think of another way to achieve this besides using
> callbacks.
> But the nodes would be deleted then each time one hits ctrl+s ?!
Hahaha! Yes, that would be a rather annoying side effect! ;^) And, since I am
the "king of excessive versioning”, I would be affected the most! LOL
I guess I was looking for a way to make the nodes “invisible” to the script
save routine. To ignore them, if you will. That could cause other, unexpected
problems, I suppose. I guess I’ll have to think about some other options… Hmm...
Thanks.
Rich
>
> sth like
>
> def deleteCustomNode()
> customNodes = nuke.allNodes('customClass')
> for node in customNodes:
> nuke.delete(node)
>
> addOnSCriptSave(deleteCustomNode)
>
> Couldnt you stuff the function back into the knob instead ?
> I dont know what the idea behind all this is, but maybe that could work too...
>
> Cheers
> Johannes
>
> Am 10/13/14 20:58 PM, schrieb Richard Bobo:
>> Hi,
>>
>> I have some nodes I am creating that I don’t want the user to save with the
>> script. On their hidden “knobChanged” knobs, they reference an
>> in-memory-only function that only gets loaded when the nodes are created.
>> So, if they are saved with the script, the function is not found when they
>> are restored and the custom knobs do nothing. So, I would like to prevent
>> the nodes from being saved with the script. That way, the user will have to
>> create new nodes the next time; the function will be referenced and loaded
>> into memory and all will be well… What’s the best way to prevent a node
>> from being saved? Should I use the onScriptSave callback? Or, is there a
>> better way?
>>
>> Thanks,
>> Rich
>>
>>
>> Rich Bobo
>> Senior VFX Compositor
>> Armstrong White
>> Email: [email protected]
>> http://armstrong-white.com/
>>
>> Email: [email protected]
>> Mobile: (248) 840-2665
>> Web: http://richbobo.com/
>>
>> "The nobler sort of man emphasizes the good qualities in others, and does
>> not accentuate the bad. The inferior does."
>> - Confucius
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ____ ESET 10555 (20141013) ____
>> The message was checked by ESET Mail Security.
>>
>> _______________________________________________
>> Nuke-python mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>>
>>
>> ____ ESET 10555 (20141013) ____
>> The message was checked by ESET Mail Security.
>
>
> --
> STUDIO RAKETE GmbH
> Johannes Hezer, Compositing TD & Stereoscopic SV
> Schomburgstr. 120
> D - 22767 Hamburg
>
> [email protected]
> Tel:+49 (0)40 - 380 375 69 - 0
> Fax:+49 (0)40 - 380 375 69 - 99
>
> ------------------------------------------------------
> Pflichtangaben laut Handelsgesetzbuch und GmbH-Gesetz:
>
> STUDIO RAKETE GmbH
> Schomburgstr. 120 D - 22767 Hamburg
>
> www.studiorakete.de / [email protected]
>
> Geschaeftsfuehrer: Jana Bohl
>
> Die Gesellschaft ist eingetragen im Handelregister des
> Amtsgerichts Hamburg unter der Nummer HR B 95660
> USt.-ID Nr.: DE 245787817
>
>
> ____ ESET 10555 (20141013) ____
> The message was checked by ESET Mail Security.
> _______________________________________________
> 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