POV-Ray : Newsgroups : povray.windows : feature request: disable file overwrite Server Time: 17 Jan 2019 02:13:41 GMT
  feature request: disable file overwrite (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Bald Eagle
Subject: feature request: disable file overwrite
Date: 24 Jan 2017 13:10:00
Message: <web.5887512288c6897ec437ac910@news.povray.org>
I know that when I've downloaded files with a browser, many of the browsers will
save a file (file1.ext) and then if the same or another file with the same name
is downloaded, it will create a modified file name (file1(2).ext).

Could some sort of .ini or command line option be implemented so that POV-Ray
will not overwrite an existing render in the directory?


Post a reply to this message

From: clipka
Subject: Re: feature request: disable file overwrite
Date: 24 Jan 2017 16:52:04
Message: <58878634$1@news.povray.org>
Am 24.01.2017 um 14:05 schrieb Bald Eagle:
> I know that when I've downloaded files with a browser, many of the browsers will
> save a file (file1.ext) and then if the same or another file with the same name
> is downloaded, it will create a modified file name (file1(2).ext).
> 
> Could some sort of .ini or command line option be implemented so that POV-Ray
> will not overwrite an existing render in the directory?

Yes, in a theoretical sense such a thing could be implemented.

As so often, the devil is in the details though: For instance, how would
you expect POV-Ray to react when rendering an animation, and /some/
frames already exist while others do not?

Also, it may be non-trivial to implement this in a manner that would fit
the intended architecture (part of which has already been put in place)
when we go for distributed rendering.


Besides, should this be a Windows-only feature (you're posting to
povray.windows, after all)? That would probably make things even more
complicated.

And last not least, is this something you deem important enough to put
other stuff aside for? Unfortunately, there's only so much manpower we
have at our disposal.


Post a reply to this message

From: Bald Eagle
Subject: Re: feature request: disable file overwrite
Date: 24 Jan 2017 17:20:01
Message: <web.58878ca4c806bbdfc437ac910@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

> As so often, the devil is in the details though: For instance, how would
> you expect POV-Ray to react when rendering an animation, and /some/
> frames already exist while others do not?

I'll have to give it a whirl, but IIRC, in the past when I've done just that,
POV-Ray seemed to have made up some alternate filename suffix, and then I had 2
sets of animation frames in the same directory.
Even if that's not the present case, to answer your question, I'd expect it to
scan for the presence of all anticipated new filenames, and either issue a
warning with a "Continue?" prompt, or just add the "bypass suffix".
That's why I suggested it could be turned on and off.

> Also, it may be non-trivial to implement this in a manner that would fit
> the intended architecture (part of which has already been put in place)
> when we go for distributed rendering.

Well, yes - I don't have a clear view of the code structure from your
perspective.

>
> Besides, should this be a Windows-only feature (you're posting to
> povray.windows, after all)? That would probably make things even more
> complicated.

I'm not picky - I thought maybe somehow doing it in Windows would make it easier
for some reason.

> And last not least, is this something you deem important enough to put
> other stuff aside for? Unfortunately, there's only so much manpower we
> have at our disposal.

I just thought it would be a nice safeguard against accidentally overwriting
images that took a long time to render, or accidentally clicking "RUN" (admit it
- we've all done it" when you hadn't manually renamed the last test render prior
to rendering the new iteration) when you've been working on something for a long
time, it's late, you're tired and distracted....

No worries, just throwing it out there as something to think about.


Post a reply to this message

From: omniverse
Subject: Re: feature request: disable file overwrite
Date: 25 Jan 2017 05:50:01
Message: <web.58883b63c806bbdf9c5d6c810@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> clipka <ano### [at] anonymousorg> wrote:
>
> > As so often, the devil is in the details though: For instance, how would
> > you expect POV-Ray to react when rendering an animation, and /some/
> > frames already exist while others do not?
> I just thought it would be a nice safeguard against accidentally overwriting
> images that took a long time to render, or accidentally clicking "RUN" (admit it
> - we've all done it" when you hadn't manually renamed the last test render prior
> to rendering the new iteration) when you've been working on something for a long
> time, it's late, you're tired and distracted....

You did say command-line, and first thing I think of to do what you ask in a
roundabout way would be to add to the command-line:

-orender2

and next 3, 4, 5, etc. before every scene run.

Sorry to be glib about it. ;)
You're idea makes sense to me. Render overwrites can be a bad thing, like you
say.

Couldn't this be done by using file write capability from within SDL? Change the
povray.ini to count file output incrementally on each render like the output
option I said above?
Of course that means putting that into every scene so it runs.


Post a reply to this message

From: clipka
Subject: Re: feature request: disable file overwrite
Date: 25 Jan 2017 10:25:27
Message: <58887d17$1@news.povray.org>
Am 25.01.2017 um 06:45 schrieb omniverse:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> clipka <ano### [at] anonymousorg> wrote:
>>
>>> As so often, the devil is in the details though: For instance, how would
>>> you expect POV-Ray to react when rendering an animation, and /some/
>>> frames already exist while others do not?
>> I just thought it would be a nice safeguard against accidentally overwriting
>> images that took a long time to render, or accidentally clicking "RUN" (admit it
>> - we've all done it" when you hadn't manually renamed the last test render prior
>> to rendering the new iteration) when you've been working on something for a long
>> time, it's late, you're tired and distracted....
> 
> You did say command-line, and first thing I think of to do what you ask in a
> roundabout way would be to add to the command-line:
> 
> -orender2
> 
> and next 3, 4, 5, etc. before every scene run.
> 
> Sorry to be glib about it. ;)
> You're idea makes sense to me. Render overwrites can be a bad thing, like you
> say.
> 
> Couldn't this be done by using file write capability from within SDL? Change the
> povray.ini to count file output incrementally on each render like the output
> option I said above?
> Of course that means putting that into every scene so it runs.

Hm... this has me thinking: Maybe a smarter way would be to allow
certain placeholders in the file name, which would be replaced by the
current date and/or time when the render was started (first frame in
case of an animation sequence).

This would entirely avoid the hassle of checking whether a file of the
same name already exists, and yet provide a convenient way to prevent
accidental overwriting of existing output files.


Post a reply to this message

From: Stephen
Subject: Re: feature request: disable file overwrite
Date: 25 Jan 2017 11:38:16
Message: <58888e28$1@news.povray.org>
On 1/25/2017 10:25 AM, clipka wrote:
> Hm... this has me thinking: Maybe a smarter way would be to allow
> certain placeholders in the file name, which would be replaced by the
> current date and/or time when the render was started (first frame in
> case of an animation sequence).
>
> This would entirely avoid the hassle of checking whether a file of the
> same name already exists, and yet provide a convenient way to prevent
> accidental overwriting of existing output files.

Would that work when using subsets of frames?

And thinking out loud:
What is the first frame?
Is it Frame_0, Frame_1 or the first frame actually rendered in the 
directory with the same base name?

Would you have a flag to switch it on and off for when we wanted to 
overwrite files?

Sorry for sounding negative but I don't think this is trivial.
On the positive side. You could pop up a warning asking if the user 
wanted to overwrite with an option to pick Yes/No/All (for animations)

-- 

Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: feature request: disable file overwrite
Date: 25 Jan 2017 14:12:57
Message: <5888b269$1@news.povray.org>
Am 25.01.2017 um 12:38 schrieb Stephen:
> On 1/25/2017 10:25 AM, clipka wrote:
>> Hm... this has me thinking: Maybe a smarter way would be to allow
>> certain placeholders in the file name, which would be replaced by the
>> current date and/or time when the render was started (first frame in
>> case of an animation sequence).
>>
>> This would entirely avoid the hassle of checking whether a file of the
>> same name already exists, and yet provide a convenient way to prevent
>> accidental overwriting of existing output files.
> 
> Would that work when using subsets of frames?
> 
> And thinking out loud:
> What is the first frame?
> Is it Frame_0, Frame_1 or the first frame actually rendered in the
> directory with the same base name?

"first frame" would typically be the one specified via
`Subset_Start_Frame`/`+SFn` if present, or `Initial_Frame`/`+KFIn`
otherwise. ("Typically" because POV-Ray does not always honor these
settings as specified; "first frame" would be the first frame actually
rendered in any animation sequence.)

> Would you have a flag to switch it on and off for when we wanted to
> overwrite files?

Kind of. You'd have to activate this feature by inserting special
strings in the output file name; e.g.
`Output_File_Name=Foo{YYYY}{MM}{DD}.png`

> Sorry for sounding negative but I don't think this is trivial.

Hey, that's _my_ line ;)


Post a reply to this message

From: Stephen
Subject: Re: feature request: disable file overwrite
Date: 25 Jan 2017 15:52:54
Message: <5888c9d6$1@news.povray.org>
On 1/25/2017 2:12 PM, clipka wrote:
> Am 25.01.2017 um 12:38 schrieb Stephen:

>>> accidental overwriting of existing output files.
>>
>> Would that work when using subsets of frames?
>>
>> And thinking out loud:
>> What is the first frame?
>> Is it Frame_0, Frame_1 or the first frame actually rendered in the
>> directory with the same base name?
>
> "first frame" would typically be the one specified via
> `Subset_Start_Frame`/`+SFn` if present, or `Initial_Frame`/`+KFIn`
> otherwise. ("Typically" because POV-Ray does not always honor these
> settings as specified; "first frame" would be the first frame actually
> rendered in any animation sequence.)
>
>> Would you have a flag to switch it on and off for when we wanted to
>> overwrite files?
>
> Kind of. You'd have to activate this feature by inserting special
> strings in the output file name; e.g.
> `Output_File_Name=Foo{YYYY}{MM}{DD}.png`
>

I have more questions but I will wait until it is implemented if it is.

>> Sorry for sounding negative but I don't think this is trivial.
>
> Hey, that's _my_ line ;)
>

How much are the royalties?

And hay is for horses. ;)

-- 

Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: feature request: disable file overwrite
Date: 25 Jan 2017 16:05:49
Message: <5888ccdd$1@news.povray.org>
Am 25.01.2017 um 16:52 schrieb Stephen:
> On 1/25/2017 2:12 PM, clipka wrote:
>> Am 25.01.2017 um 12:38 schrieb Stephen:
> 
>>>> accidental overwriting of existing output files.
>>>
>>> Would that work when using subsets of frames?
>>>
>>> And thinking out loud:
>>> What is the first frame?
>>> Is it Frame_0, Frame_1 or the first frame actually rendered in the
>>> directory with the same base name?
>>
>> "first frame" would typically be the one specified via
>> `Subset_Start_Frame`/`+SFn` if present, or `Initial_Frame`/`+KFIn`
>> otherwise. ("Typically" because POV-Ray does not always honor these
>> settings as specified; "first frame" would be the first frame actually
>> rendered in any animation sequence.)
>>
>>> Would you have a flag to switch it on and off for when we wanted to
>>> overwrite files?
>>
>> Kind of. You'd have to activate this feature by inserting special
>> strings in the output file name; e.g.
>> `Output_File_Name=Foo{YYYY}{MM}{DD}.png`
>>
> 
> I have more questions but I will wait until it is implemented if it is.

I suggest you better not hold your breath.


Post a reply to this message

From: Stephen
Subject: Re: feature request: disable file overwrite
Date: 25 Jan 2017 16:25:17
Message: <5888d16d$1@news.povray.org>
On 1/25/2017 4:05 PM, clipka wrote:
> Am 25.01.2017 um 16:52 schrieb Stephen:

>>> `Output_File_Name=Foo{YYYY}{MM}{DD}.png`
>>>
>>
>> I have more questions but I will wait until it is implemented if it is.
>
> I suggest you better not hold your breath.
>

That is why I am not asking them now. No point in wasting brain cells. :)

-- 

Regards
     Stephen


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

Copyright 2003-2008 Persistence of Vision Raytracer Pty. Ltd.