You can just add those lines in your init.py

def createWriteDir():
  import nuke, os
  file = nuke.filename(nuke.thisNode())
  dir = os.path.dirname( file )
  osdir = nuke.callbacks.filenameFilter( dir )
  try:
    os.makedirs( osdir )
    return
  except:
    return

nuke.addBeforeRender( createWriteDir )

2014-11-27 19:49 GMT+01:00 Ron Ganbar <ron...@gmail.com>:

> This whole issue of the folder not being created has always annoyed me.
> Should be automatic, in my opinion. Or at least there can be a checkbox in
> the Write "automatically create path / don't overwrite existing".
>
>
>
> Ron Ganbar
> email: ron...@gmail.com
> tel: +44 (0)7968 007 309 [UK]
>      +972 (0)54 255 9765 [Israel]
> url: http://ronganbar.wordpress.com/
>
> On Thu, Nov 27, 2014 at 8:47 PM, Mads Hagbarth Lund <madshl...@gmail.com>
> wrote:
>
>> I don't think you can do that from Nuke Studio. I mean... You can't make
>> it put some code into the prerender bar.
>>
>> Den 27/11/2014 kl. 18.36 skrev Elias Ericsson Rydberg <
>> elias.ericsson.rydb...@gmail.com>:
>>
>> I haven't tried studio, but could you not write a a preRenderScript?
>> Check if the path exists, otherwise create it.
>> Den 27 nov 2014 17:21 skrev "Mads Lund" <madshl...@gmail.com>:
>>
>>> Hey guys.
>>>
>>> Nuke write nodes does not create folders by default. While its nice that
>>> in Nuke 9 it will bump the path folders to the same as the script version,
>>> it still doesn't create those folders, forcing the artists to create them
>>> by hand. (introducing human errors and what not)
>>>
>>> Back when we were doing our pipeline tools our selves directly inside
>>> Nuke, we would just make a custom write node that dealt with that. However
>>> Nuke Studio does not have a option to modify the write node. And there
>>> doesn't seem to be any build-in python calls to modify existing nuke
>>> scripts.
>>>
>>> So i am wondering how you guys are making sure that Nuke will create the
>>> folders needed every time your artists bump up the version number. And make
>>> sure that Nuke Studio don't get stuck because a render folder does not
>>> exist.
>>>
>>>
>>>
>>> _______________________________________________
>>> Nuke-users mailing list
>>> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>
>> _______________________________________________
>> Nuke-users mailing list
>> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>
>>
>> _______________________________________________
>> Nuke-users mailing list
>> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>
>
>
> _______________________________________________
> Nuke-users mailing list
> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>



-- 
*Tommaso Fioretti - Digital Compositor +393386786057*
_______________________________________________
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to