Page 1 of 1

Automating project-setup with python

Posted: Thu Jul 04, 2013 8:38 am
by izo
Hi guys,

We're looking to optimize our workflow at work, and when you have a large number of shots, setting up projects for every one becomes tedious, so I'm wondering if project creation can be automated with python? I'm not that into scripting myself, but would like to point my technical supervisor in the right direction.

What we would like to do is create the project folder based one the parent folder names, then create the subfolders, the flw-file and set it all up and launch in rf.

Does anyone have any experience of doing this, or have seen it set up?
Thanks for any help!

Re: Automating project-setup with python

Posted: Thu Jul 04, 2013 9:03 am
by LuisMiguel
Hi izo,

I have a script to make a set project so you can set the folder you want only tryping a directory, I hope to upload it asap. Meanwhile, in order to create folder with python you can use

Code: Select all

import sys,os
#######################################################
def main():
	homedir = scene.getRootPath()
	dirname = homedir + "/" + "selections"	+ "/"

	if not os.path.isdir(dirname): 
		os.mkdir(dirname)
	else:
		scene.message("Folder is already created")
#######################################################
This script is searching a folder called "selections" and if it is not there, will be created.

luisM.