Oh, yeah. That explains a lot of things, actually.
I've been doing that with setInput(), but then realised that it's actually
ruining my variable as it's no longer a node object at that point.

Good variable:
nn = nuke.nodes.Write()
print nn
>>> <Write1 at 0x119084830>

Bad variable:
nn = nuke.nodes.Write().setInput(0, someNode)
print nn
>>> True

Understood Ivan.
Thanks a lot.


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 22:44, Ivan Busquets <[email protected]> wrote:

> Ok, sorry, I didn't get you wanted it in a single line. But since both
> nuke.createNode and nuke.nodes return a node object, you can keep calling
> for methods on that node object.
>
> i.e.
> nuke.nodes.Write()['file'].fromUserText('test.jpg')
>
>
>
>
> On Thu, Oct 27, 2011 at 1:30 PM, Ron Ganbar <[email protected]> wrote:
>
>> Sure. But just not in one line.
>> (I really don't know why I mind to have things in one line of not)
>>
>> Thanks
>>
>>
>> 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 22:26, Ivan Busquets <[email protected]> wrote:
>>
>>> 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
>>>
>>>
>>
>> _______________________________________________
>> 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