you can put this in your menu.py
def CreatePath():
file = nuke.filename(nuke.thisNode())
dir = os.path.dirname(file)
osdir = nuke.callbacks.filenameFilter(dir)
try:
os.makedirs (osdir)
except OSError:
pass
nuke.addBeforeRender(CreatePath, nodeClass = 'Write')
On Fri, Apr 27, 2012 at 3:51 PM, Rich Bobo <[email protected]> wrote:
> Hi,
>
> I know that there are several tutorials and examples of using Python to
> automatically create output directories for Write nodes, such as this:
> http://www.nukepedia.com/gizmos/python-scripts/nodegraph/autowrite/
>
> What I'm wondering is if it's possible to use the Write node's "Python -
> before render" field to do it?
>
>
> Thanks for any help!
>
> Rich
>
>
> Rich Bobo
> Senior VFX Compositor
>
> Mobile: (248) 840-2665
> Web: http://richbobo.com/
>
>
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
--
Julien Chandelle
GSM : +32 (0) 494 277 542
julienchandelle.be <http://www.julienchandelle.be>
@jimbiscuit <https://twitter.com/#%21/jimbiscuit> ||
imdb<http://www.imdb.com/name/nm2844171/>
|| Nuke , AE & Fusion Compositor ||
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users