without having looked at this in NUke, I'm guessing it's because calling a
function from a knob inside a node will execute it in the node's context, while
your camera is still on root level.
To verify you can try adding "root." in front of the camera name and see if
that does the trick.
On Sep 23, 2011, at 8:04 PM, AcidDrippa wrote:
> Hi
>
> I was trying to call a tcl command when I click on a button in a python
> panel. So I have a function like:
>
> def LoadChannelFileTCL(cameraName, channelFile):
> s="in \""+cameraName+"\" {import_chan_file \""+channelFile+"\"}"
> nuke.tcl(s)
>
> The function accepts the camera name and channel file name which are stored
> in variables.
>
> When I call this function directly from the script editor everything works
> fine and the channel file is imported. But when I call it from the button
> event handler:
>
> def knobChanged(self, knob):
> if knob is self.callfunc:
> LoadChannelFileTCL(cameraName, channelFile)
>
> I get the following error:
>
> RuntimeError: Nothing is named "Camera1"
>
> Please can anyone help me with this? Is it a Nuke-python bug?
>
> Thanks
> _______________________________________________
> 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