Here's part of a script I wrote some time ago when I was learning python
for nuke:

# If the directory does not exist already, we create it.
# A folder named after the nuke script is created inside it. But without
user-suffix and .nk-extention
def createWriteDir():
    import nuke
    import 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 )

The script fetches what is written in the filename field on the write node,
removes the filename and creates the directory. If it's not already created.

Cheers,

Elias



2013/5/30 Darren Coombes <[email protected]>

> Does anyone know of a way in which you can have a folder created
> automatically on render that has the render version of the comp? For mac
> osx.
>
> Thanks.
>
>     *
>  Darren Coombes - VFX Compositor
>
> Check out some of my work…
> www.vimeo.com/53990514
>
> Mob:  +61 418 631 079
> Skype:  darrencoombes
> Twitter:  @durwood81
> *
>
>
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to