From: wattana <watttana@(email surpressed)>
Subject: wrong frame info
   Date: Thu, 12 Apr 2012 14:43:29 -0400
Msg# 2210
View Complete Thread (9 articles) | All Threads
Last Next
Hi Greg!

Thanks a lot for the quick answer.

Yes, I render the same scene and the same frame range because I want to 
render different layers. But in previous projects, I've been doing the 
same without any problem...

Anyway, is there a way to change the name of the log (including layer 
name) or some other workaround?? 

Thanks a lot!

   From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: wrong frame info
   Date: Thu, 12 Apr 2012 15:06:24 -0400
Msg# 2211
View Complete Thread (9 articles) | All Threads
Last Next
On 04/12/12 11:43, wattana wrote:
> Hi Greg!
> 
> Thanks a lot for the quick answer.
> 
> Yes, I render the same scene and the same frame range because I want to 
> render different layers. But in previous projects, I've been doing the 
> same without any problem...
> 
> Anyway, is there a way to change the name of the log (including layer 
> name) or some other workaround?? 

	Yes, in the submit form, you can specify an alternate
	location for the log directory; under the 'Rush' tab
	there should be a "Log Directory:" prompt that is normally
	left blank for the default behavior of using the scene file
	as the pathname to use for the logs.

	If you type your own pathname there, it will use that
	path instead for the logs, preventing the overwrite.

	Other approaches: make a copy of your scene file
	called something else and submit the copy. This will
	cause the log to be based on the scene file copy's name.

	Or if the scene file is large, just make a symlink to it
	with a different name, and submit that for the same effect.


-- 
Greg Ercolano, erco@(email surpressed)
Seriss Corporation
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)ext.23
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)


   From: wattana <watttana@(email surpressed)>
Subject: Re: wrong frame info
   Date: Fri, 13 Apr 2012 13:29:12 -0400
Msg# 2213
View Complete Thread (9 articles) | All Threads
Last Next
Hi Greg!!

Thanks for the answer!

Yes, it seems that the location of the log file is the key of the 
problem...

But I do not understand why I never had this problem before... I've 
rendered a lot of projects and never seen this problem...

I found a way to workaround it coding (a little bit) the maya_submit.pl 
file. Here's the change I've made:

..
..
..
..
  # LOGDIR BASED ON SCENE PATH
    if ( $in{LogDirectory} eq "" )
    {
	$in{LogDirectory} = "$in{ScenePath}.$in{JobTitle}.log";

	# CREATE LOGDIR ONLY IF AUTOMATICALLY GENERATED
	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");
	    }
	}
    }
..
..
..
..

I've added "$in{JobTitle}" in the logdir creation. I've tested and worked 
fine.. Now is the responsability for whoever launches a job to keep 
different job names, but I always put in the scene name and the layer.

Can this hack affect in anyway the normal rush behavior?

Thanks for your time!!



On Thu, 12 Apr 2012 15:06:24 -0400, Greg Ercolano wrote:

> On 04/12/12 11:43, wattana wrote:
>> Hi Greg!
>> 
>> Thanks a lot for the quick answer.
>> 
>> Yes, I render the same scene and the same frame range because I want to
>> render different layers. But in previous projects, I've been doing the
>> same without any problem...
>> 
>> Anyway, is there a way to change the name of the log (including layer
>> name) or some other workaround??
> 
> 	Yes, in the submit form, you can specify an alternate location 
for the
> 	log directory; under the 'Rush' tab there should be a "Log 
Directory:"
> 	prompt that is normally left blank for the default behavior of 
using
> 	the scene file as the pathname to use for the logs.
> 
> 	If you type your own pathname there, it will use that path 
instead for
> 	the logs, preventing the overwrite.
> 
> 	Other approaches: make a copy of your scene file called something 
else
> 	and submit the copy. This will cause the log to be based on the 
scene
> 	file copy's name.
> 
> 	Or if the scene file is large, just make a symlink to it with a
> 	different name, and submit that for the same effect.


   From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: wrong frame info
   Date: Fri, 13 Apr 2012 13:56:32 -0400
Msg# 2214
View Complete Thread (9 articles) | All Threads
Last Next
On 04/13/12 10:29, wattana wrote:
> Hi Greg!!
> Thanks for the answer!
> 
> Yes, it seems that the location of the log file is the key of the 
> problem...
> 
> But I do not understand why I never had this problem before... I've 
> rendered a lot of projects and never seen this problem...

	The issue wouldn't come up unless you rendered
	the same scene and same frame range with two active jobs
	at the same time.

	Usually people don't ever want to have two jobs running
	the same scene/same frame range, as they'll overwrite
	each others images (as well as logs), causing corruptions.

	The only time I could see doing this for a desirable
	purpose is if the two jobs were rendering different layers.

> I found a way to workaround it coding (a little bit) the maya_submit.pl 
> file. Here's the change I've made:
> [..]
> 	$in{LogDirectory} = "$in{ScenePath}.$in{JobTitle}.log";
> [..]
> 
> I've added "$in{JobTitle}" in the logdir creation. I've tested and worked 
> fine.. Now is the responsability for whoever launches a job to keep 
> different job names, but I always put in the scene name and the layer.

	Yes, that should be fine.

	But as you say, one would have to customize the job title,
	because by default the job title will be based on the scene
	filename, where you'll have the same issue again.

	But one question: Are you in fact rendering
	the same scene/same frame range at the same time?

	Normally this is a bad thing, unless there's something
	to keep their output separate (eg. rendering different layers).

	If two jobs are actively rendering the same scene/same frames,
	there's the chance they'll corrupt each other, or give a mix
	of old and new renders, as well as wasting cpu.

	If you resubmit the same scene/frame range, be sure
	to dump any previous renders of the same scene that might
	still be running, otherwise the two jobs will fight each other
	for both images and logs. (I guess with your fix the logs won't
	overwrite, but the data still will)

-- 
Greg Ercolano, erco@(email surpressed)
Seriss Corporation
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)ext.23
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)


   From: wattana <watttana@(email surpressed)>
Subject: Re: wrong frame info
   Date: Fri, 13 Apr 2012 14:07:27 -0400
Msg# 2215
View Complete Thread (9 articles) | All Threads
Last Next
Hi Greg!

Yes, I render the same scene, with the same frame range, but different 
render layers.

And it's the way I've rendered a lot of projects.. but.. I don't know why 
now the logs are mixing... You said it's the default behavior but... I've 
never seen that before..

Anyway it's working now with the little hack.

I think render layers are a good way to save time and bring flexibility 
to postpo workflow. In fact the oputput images are in separate folders 
taken by what render layer says, so I think I'm safe from overwrite the 
same data.

Thanks!!

On Fri, 13 Apr 2012 13:56:32 -0400, Greg Ercolano wrote:

> On 04/13/12 10:29, wattana wrote:
>> Hi Greg!!
>> Thanks for the answer!
>> 
>> Yes, it seems that the location of the log file is the key of the
>> problem...
>> 
>> But I do not understand why I never had this problem before... I've
>> rendered a lot of projects and never seen this problem...
> 
> 	The issue wouldn't come up unless you rendered the same scene and 
same
> 	frame range with two active jobs at the same time.
> 
> 	Usually people don't ever want to have two jobs running the same
> 	scene/same frame range, as they'll overwrite each others images 
(as
> 	well as logs), causing corruptions.
> 
> 	The only time I could see doing this for a desirable purpose is 
if the
> 	two jobs were rendering different layers.
> 
>> I found a way to workaround it coding (a little bit) the maya_submit.pl
>> file. Here's the change I've made:
>> [..]
>> 	$in{LogDirectory} = "$in{ScenePath}.$in{JobTitle}.log";
>> [..]
>> 
>> I've added "$in{JobTitle}" in the logdir creation. I've tested and
>> worked fine.. Now is the responsability for whoever launches a job to
>> keep different job names, but I always put in the scene name and the
>> layer.
> 
> 	Yes, that should be fine.
> 
> 	But as you say, one would have to customize the job title, 
because by
> 	default the job title will be based on the scene filename, where 
you'll
> 	have the same issue again.
> 
> 	But one question: Are you in fact rendering the same scene/same 
frame
> 	range at the same time?
> 
> 	Normally this is a bad thing, unless there's something to keep 
their
> 	output separate (eg. rendering different layers).
> 
> 	If two jobs are actively rendering the same scene/same frames, 
there's
> 	the chance they'll corrupt each other, or give a mix of old and 
new
> 	renders, as well as wasting cpu.
> 
> 	If you resubmit the same scene/frame range, be sure to dump any
> 	previous renders of the same scene that might still be running,
> 	otherwise the two jobs will fight each other for both images and 
logs.
> 	(I guess with your fix the logs won't overwrite, but the data 
still
> 	will)


   From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: wrong frame info
   Date: Fri, 13 Apr 2012 14:56:23 -0400
Msg# 2216
View Complete Thread (9 articles) | All Threads
Last Next
On 04/13/12 11:07, wattana wrote:
> And it's the way I've rendered a lot of projects.. but.. I don't know why 
> now the logs are mixing... You said it's the default behavior but... I've 
> never seen that before..
> 
> Anyway it's working now with the little hack.

	OK, sounds good then.
	Probably just by chance you didn't run into it.

	There are other things you could do to make the logs unique,
	but if you do, it means resubmitting will make many log dirs.

	Another technique you might find useful is to tack on
	the date+time, eg:

use POSIX qw(strftime);
my $datestr = strftime("%Y-%m-%d-%H-%M-%s", localtime);
$in{LogDirectory} = "$in{ScenePath}--${datestr}.log";

	This would create a log path that looks like:

/your/path/foo.ma--2012-04-13-11-51-59.log/

	Then you wouldn't have to worry about changing the job title.
	You could work the job title in there too.

	Or perhaps you could modify the logdir to include the
	layer name automatically by parsing the Maya Flags: prompt
	for the layer names, and include them in the log name AND job title.
	(If that's something you do often)


-- 
Greg Ercolano, erco@(email surpressed)
Seriss Corporation
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)ext.23
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)


   From: wattana <watttana@(email surpressed)>
Subject: Re: wrong frame info
   Date: Fri, 13 Apr 2012 15:29:46 -0400
Msg# 2217
View Complete Thread (9 articles) | All Threads
Last Next
Hi Greg!

Yeah, adding only the layer name will be a perfect solution but with my 
poor perl knowledge I cannot figure how to do it...

I mean... I found the "$in{MayaFlags}" var, but it will add "-rl 
something" to the path and I don't like to mess up with spaces and weird 
characters in any path.

Do you know a way to retrieve the layer name only?

Btw, thanks a lot for your time. This issue was driving me nuts. XD

On Fri, 13 Apr 2012 14:56:23 -0400, Greg Ercolano wrote:

> On 04/13/12 11:07, wattana wrote:
>> And it's the way I've rendered a lot of projects.. but.. I don't know
>> why now the logs are mixing... You said it's the default behavior
>> but... I've never seen that before..
>> 
>> Anyway it's working now with the little hack.
> 
> 	OK, sounds good then.
> 	Probably just by chance you didn't run into it.
> 
> 	There are other things you could do to make the logs unique, but 
if you
> 	do, it means resubmitting will make many log dirs.
> 
> 	Another technique you might find useful is to tack on the date
+time,
> 	eg:
> 
> use POSIX qw(strftime);
> my $datestr = strftime("%Y-%m-%d-%H-%M-%s", localtime);
> $in{LogDirectory} = "$in{ScenePath}--${datestr}.log";
> 
> 	This would create a log path that looks like:
> 
> /your/path/foo.ma--2012-04-13-11-51-59.log/
> 
> 	Then you wouldn't have to worry about changing the job title. You 
could
> 	work the job title in there too.
> 
> 	Or perhaps you could modify the logdir to include the layer name
> 	automatically by parsing the Maya Flags: prompt for the layer 
names,
> 	and include them in the log name AND job title. (If that's 
something
> 	you do often)


   From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: wrong frame info
   Date: Fri, 13 Apr 2012 16:19:52 -0400
Msg# 2218
View Complete Thread (9 articles) | All Threads
Last Next
On 04/13/12 12:29, wattana wrote:
> [posted to rush.general]
> 
> Hi Greg!
> 
> Yeah, adding only the layer name will be a perfect solution but with my 
> poor perl knowledge I cannot figure how to do it...
> 
> I mean... I found the "$in{MayaFlags}" var, but it will add "-rl 
> something" to the path and I don't like to mess up with spaces and weird 
> characters in any path.
> 
> Do you know a way to retrieve the layer name only?

	Sure, a little regular expression (regex) to handle that.

	Assuming you're specifying render layers with something like:

-rl red_layer,green_layer

	..and perhaps Maya Flags: ends up having other flags mixed in, eg:

-bla -bla -rl red_layer,green_layer -bla -bla

	..then to focus in on the "red_layer,green_layer" you could use:

my $layernames = $in{MayaFlags};
$layernames =~ s/(^-rl |.* -rl )(\S+).*/$2/;

	..and then:

$in{LogDirectory} = "$in{ScenePath}-${layernames}.log";

	If you're using spaces in the layer names, that makes it
	a bit trickier; you'd have to isolate the quotes and stuff,
	which would add a bit of extra logic.

	If you need to go there, give me some pathological examples
	and I can give you a regex to handle it.

	BTW, to figure out the above, I just made a little perl script
	and messed around with it until it worked, eg:

--- snip
$s = "-foo -bar -rl aaa,bbb -bla";
$s =~ s/(^-rl |.* -rl )(\S+).*/$2/;
print "S='$s'\n";
--- snip



-- 
Greg Ercolano, erco@(email surpressed)
Seriss Corporation
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)ext.23
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)


   From: wattana <watttana@(email surpressed)>
Subject: Re: wrong frame info
   Date: Mon, 16 Apr 2012 12:26:31 -0400
Msg# 2219
View Complete Thread (9 articles) | All Threads
Last Next
Hi Greg!!

This is the one!! Thanks a lot for the quick fix!!

Maya doesn't allow spaces in layers names (doesn't allow them anywhere XD) 
so the first piece of code should work great.

I'll make a little test and provide feedback!!

Thanks Greg!! really mean it!

On Fri, 13 Apr 2012 16:19:52 -0400, Greg Ercolano wrote:

> On 04/13/12 12:29, wattana wrote:
>> [posted to rush.general]
>> 
>> Hi Greg!
>> 
>> Yeah, adding only the layer name will be a perfect solution but with my
>> poor perl knowledge I cannot figure how to do it...
>> 
>> I mean... I found the "$in{MayaFlags}" var, but it will add "-rl
>> something" to the path and I don't like to mess up with spaces and
>> weird characters in any path.
>> 
>> Do you know a way to retrieve the layer name only?
> 
> 	Sure, a little regular expression (regex) to handle that.
> 
> 	Assuming you're specifying render layers with something like:
> 
> -rl red_layer,green_layer
> 
> 	..and perhaps Maya Flags: ends up having other flags mixed in, eg:
> 
> -bla -bla -rl red_layer,green_layer -bla -bla
> 
> 	..then to focus in on the "red_layer,green_layer" you could use:
> 
> my $layernames = $in{MayaFlags};
> $layernames =~ s/(^-rl |.* -rl )(\S+).*/$2/;
> 
> 	..and then:
> 
> $in{LogDirectory} = "$in{ScenePath}-${layernames}.log";
> 
> 	If you're using spaces in the layer names, that makes it a bit
> 	trickier; you'd have to isolate the quotes and stuff, which would 
add a
> 	bit of extra logic.
> 
> 	If you need to go there, give me some pathological examples and I 
can
> 	give you a regex to handle it.
> 
> 	BTW, to figure out the above, I just made a little perl script and
> 	messed around with it until it worked, eg:
> 
> --- snip
> $s = "-foo -bar -rl aaa,bbb -bla";
> $s =~ s/(^-rl |.* -rl )(\S+).*/$2/;
> print "S='$s'\n";
> --- snip