Gary Jaeger wrote:
> if [I] point rush to create logs in a /logs directory that I create, rush will
> just start filling up that directory with log files. So no sub
> directories with scene name prefixes are created.
Correct; if you type in a path, then it uses that exact path
to the logs.. no frills.
> I would like those [scene specific directories]
> to be created automatically just as they are if I leave it at the
> default.
I see.
There would need to be a way to do both, since some folks
would want it to be the exact path specified, others would
want the behavior you're requesting.
I could set it up so that you can append on a suffix to the
log directory (like %scene%) so that it automatically tacks on
the scene file's basename.
So for instance, the user would specify:
//some/path/logs/%scene%
..and assuming the '//some/path/logs/' directory existed,
the submit script would automatically replace %scene% with
the scene's basename, and create that directory, e.g:
//some/path/to/logs/my_scene.log/
..and then would submit the job to use that.
You can definitely tweak the submit script to do this.
For instance, try making a copy of your production submit-maya.pl script,
and edit the copy by finding these lines:
--- snip
# LOGDIR BASED ON SCENE PATH
if ( $in{LogDirectory} eq "" )
--- snip
..and /insert/ the following code between the two lines:
--- snip
if ( $in{LogDirectory} =~ s/[\/\\]%scene%[\s]*$/\// )
{
# HANDLE A CUSTOM LOG DIRECTORY WITH %scene% SUFFIX
if ( ! -d $in{LogDirectory} )
{
print STDERR "$in{LogDirectory}: does not exist ".
"(please create it first)\n";
exit(1);
}
# PARSE OUT THE BASENAME OF THE SCENE FILENAME,
if ( $in{ScenePath} =~ m%[\\/]([^/\\]*$)% )
{ $in{LogDirectory} .= "$1.log"; }
if ( ! -d $in{LogDirectory} )
{
unless ( mkdir($in{LogDirectory}, 0777) )
{
print STDERR "mkdir($in{LogDirectory}): $!\n" .
"Can't make log directory.\n";
exit(1);
}
# WINDOWS: OPEN ACLS FOR THE LOG DIRECTORY
if ( $G::iswindows )
{
my $dirname = $in{LogDirectory}; $dirname =~ s%/%\\%g;
system("cacls $dirname /e /c /g everyone:f");
}
}
}
--- snip
..worked for me! ;)
--
Greg Ercolano, erco@(email surpressed)
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)
|