Does seem odd you can add the knob, but not set the value.. Probably
worth asking support@ about it - there might be some specific reason for
disallowing it, or the Root node might just have been overlooked
As a workaround, could you set the initial value in the knob constructor?
n = nuke.String_Knob("foo", "foo label" "initial value")
nuke.root().addKnob(n)
On 10/12/13 22:37, Martin Chatterjee wrote:
> Hey there,
>
>
> I'd love to know a bit more about the limitations regarding the
> execution of python code within a*'Nuke Assist'* session.
>
> We are using a custom Loader/Saver PythonPanel within Nuke ('we' being
> Sehsucht, Hamburg), and it is not working right now within an 'Assist'
> session.
>
> *The point where our code breaks within 'Assist' is the interaction with
> custom knobs living on the root node.*
>
> Apparently 'Nuke Assist' lets me create these knobs, but they are
> read-only from there onwards:
>
>
> *# Repro -----------------*
> *
> *
>
> *import nuke*
>
> *myKnob = nuke.String_Knob("foo")*
>
> *nuke.root().addKnob(myKnob)*
>
> *myKnob.setValue("DoesNotWorkInAssist") # this will fail in 'Nuke Assist'*
>
> *print myKnob.value()*
>
> *
> *
>
> *# -----------------------*
>
>
> Is this expected behaviour?
>
> Up to now I've just found this piece of information in the docs: (from
> the "Nuke7.0v9GettingStarted.pdf"):
>
> *[...] *
> *Python scripts work as usual for nodes that are supported by Nuke Assist, *
> *but any attempt to add unsupported nodes displays an error message in the *
> *Script Editor output section, or terminal (in -t mode). *
> *[....]*
>
> Surely the root node should be a supported node within 'Nuke Assist'?
>
> Thanks in advance for any pointers on this one.
>
>
> Cheers, Martin
>
> --
> Martin Chatterjee
>
> [ Freelance Technical Director ]
> [ http://www.chatterjee.de <http://www.chatterjee.de/> ]
> [ https://vimeo.com/chatterjee ]
>
>
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
--
ben dickson
2D TD | [email protected]
rising sun pictures | www.rsp.com.au
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python