POV-Ray : Newsgroups : povray.documentation.inbuilt : Default values in v3.8.0 : Re: Default values in v3.8.0 Server Time
2 Dec 2023 21:09:16 EST (-0500)
  Re: Default values in v3.8.0  
From: clipka
Date: 1 Oct 2018 09:24:03
Message: <5bb21ff3$1@news.povray.org>
Am 01.10.2018 um 11:22 schrieb Stephen:
> On 01/10/2018 01:55, clipka wrote:
>> Am 01.10.2018 um 02:45 schrieb clipka:
>>> The text currently reads "When #version is set as either the VERY first
>>> statement of the scene file or via command-line option and the version
>>> is 3.8 or greater ..."
>> (Just for the records, The wording /can/ be interpreted to be correct:
>> If you don't specify `#version` as the VERY first statement with SOME
>> value, you can't set it to 3.8 later, and thus can't switch to the new
>> defaults. And the new defaults are enabled if the version is 3.8 or
>> greater at SOME particular point. But I guess that's not how most people
>> would understand it.)
> Is there a functional or technical reason that you are implementing
> this? It will make things harder for me using my modeller as I can only
> change the Pov version from the default (3.6) after the default version
> has been declared in the .pov file.

Wait, what?

Ok, let me clarify:

The text on the Wiki currently reads as quoted above (unless Jim has
already found time to change it).

This CAN be interpreted as:

"To get the new defaults, the VERY first statement in the scene file
must be `#version 3.8` [...]"

And as a matter of fact that's how it was(!) implemented in earlier
v3.7.1 / v3.8.0 pre-releases, and why it was worded like that.

However, the implementation has recently been changed; now the statement
in the wiki can only be considered correct (and only technically so) if
interpreted as:

"To get the new defaults, the VERY first statement in the scene file
must be `#version <whatever>` [...], and it needs to be set to 3.8

To make it completely clear, the updated requirements to get the new
defaults are as follows:

(1) Start the scene with ANY odd `#version` statement. (Not a primary
requirement, but you can't switch to `#version 3.8` otherwise.)

(2) Switch to `#version 3.8` before the `pigment`/`finish`/`camera`
statements that are supposed to be based on the new defaults. (You'll
get v3.7 defaults otherwise.)

(3) Make sure you have switched to `#version 3.8` before any `default`
statement. (`#version` will cease to auto-switch defaults after you have
specified defaults manually, for reasons that I guess are self-evident.)

And here's the same from the implementation point of view:

(A) Defaults are initially set up according to the `Version` INI setting
or equivalent command-line option; if absent, v3.7 [or, technically more
exact, v3.62] defaults are used.

(B) Any `#version` statement changes the defaults accordingly [unless
rule (C) has kicked in].

(C) Any `default` statement prevents all subsequent `#version`
statements from changing the defaults.

(D) If rule (C) has kicked in, any `#version` statement that would
otherwise change the defaults will generate a warning instead.

Plus, unrelated:

(X) If a `#version` statement in the main scene file tries to set the
version to 3.8 or higher, and the first statement was not a `#version`
statement, generate an error.

So unless your modeller is throwing you some additional curveball, I
think you should be fine.

Post a reply to this message

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