Permalink
Browse files

maya fixes

  • Loading branch information...
1 parent 54c7c64 commit 926be408da2dd6ff4ca7b977849e8084f7547365 @robmoggach committed Oct 26, 2011
Showing with 6 additions and 3 deletions.
  1. +5 −2 dirtt/__init__.py
  2. +1 −1 dirtt/data/templates/dshng_shot_maya_2012.xml
View
@@ -49,6 +49,8 @@ def get_version():
DEFAULT_USER = "root"
DEFAULT_GROUP = "root"
+TEMPLATES_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'data', 'templates')
+
def list_available_templates():
template_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'data', 'templates')
for filename in os.listdir(template_dir):
@@ -163,8 +165,9 @@ def startElement(self, name, attrs):
if self.verbose: print "\tCreating file: %s/%s (%s/%i:%i)" % (self.current_dir, basename, oct(perms), uid, gid)
href = attrs.get("href",None)
if not href is None:
- template_str = self._read_template(href)
- content = self._parse_template(template_str, href)
+ template_file = os.path.join(TEMPLATES_DIR,href)
+ template_str = self._read_template(template_file)
+ content = self._parse_template(template_str, template_file)
create_file(basename, content, perms, uid, gid)
else:
if name in ('dirtt', 'dir'):
@@ -32,5 +32,5 @@
<dir basename="sourceimages" username="pipeline" group="artist" perms="02775">
<dir basename="3dPaintTextures" username="pipeline" group="artist" perms="02775"/>
</dir>
- <file basename="workspace.mel" username="pipeline" group="artist" perms="02775" href="/dashing/jobs/var/dirtt/templates/dshng_shot_maya_2012.xml"/>
+ <file basename="workspace.mel" username="pipeline" group="artist" perms="02775" href="dshng_shot_maya_2012_workspace.mel"/>
</dirtt>

0 comments on commit 926be40

Please sign in to comment.