Sure, you can use fromUserText() after you've created the node with
nuke.nodes.<nodeClass>()

w = nuke.nodes.Write()
w['file'].fromUserText('file.jpg')


On Thu, Oct 27, 2011 at 1:18 PM, Ron Ganbar <[email protected]> wrote:

> Hey Ivan,
> thanks!
>
> This is not possible through nuke.nodes.Write(file = 'file.jpg') though is
> it? Or can I use fromUserText() there as well?
>
>
>
> Ron Ganbar
> email: [email protected]
> tel: +44 (0)7968 007 309 [UK]
>      +972 (0)54 255 9765 [Israel]
> url: http://ronganbar.wordpress.com/
>
>
>
> On 27 October 2011 21:44, Ivan Busquets <[email protected]> wrote:
>
>> Hi Ron,
>>
>> To make sure the callbacks associated with changing the filename are
>> triggered, use the fromUserText() method. Same thing applies for Read nodes
>> so it sets the resolution and in/out frames.
>>
>> w = nuke.createNode('Write')
>> w['file'].fromUserText('test.jpg')
>>
>>
>> On Thu, Oct 27, 2011 at 12:13 PM, Ron Ganbar <[email protected]> wrote:
>>
>>> Hi all,
>>> probably a bit of a newbie question, anyway:
>>>
>>> When I create a Write node and populate the 'file' knob with a path that
>>> ends with an extension (say jpg) nuke doesn't automatically update the 'file
>>> type' drop down menu in the same way it does when this is done manually. Is
>>> there a way to make it do that? Or do I just have to go and change the 'file
>>> type' drop down with another line of code?
>>>
>>> Just wondering.
>>>
>>> Thanks,
>>> Ron Ganbar
>>> email: [email protected]
>>> tel: +44 (0)7968 007 309 [UK]
>>>      +972 (0)54 255 9765 [Israel]
>>> url: http://ronganbar.wordpress.com/
>>>
>>>
>>> _______________________________________________
>>> 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
>
>
_______________________________________________
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