POV-Ray

The Persistence of Vision Raytracer (POV-Ray).

This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.

Attached to Project: POV-Ray
Opened by Mike H - 2010-06-09
Last edited by Thorsten Fröhlich - 2010-06-25

FS#125 - System variable to track whether a file has been included.

Request a system variable to test whether a scene file has been included by another scene file.

For instance:

#if (is_included)
  camera {...}
#end
Closed by  Thorsten Fröhlich
Friday, 25 June 2010, 19:21 GMT
Reason for closing:  Won't implement
Additional comments about closing:  

Determining if a file should be rendered can be solved with the Declare INI option. Declare some variable there and in every file check for it before including any other file. Undef it as one of the first things in the file, so it remains seen only the the main POV file.

Grimbert Jérôme commented on Thursday, 10 June 2010, 12:38 GMT

what is wrong with the #ifdef ?

The ancillary file might #define some identifier, and the main file can test for its existence.

Am I missing a clue ?

Admin
Christoph Lipka commented on Friday, 18 June 2010, 20:43 GMT

As far as I understand, the request is not for a way to test whether e.g. "colors.inc" has been included, but rather whether the file currently being parsed is the main scene file or an included file instead.

Jim Holsenback commented on Saturday, 19 June 2010, 01:23 GMT

Hmmm ... I read it as Grimbert did ... as a matter of fact already I mentioned this to Mike.

Mike H commented on Sunday, 20 June 2010, 00:17 GMT

Christoph is correct. It is for the file currently being parsed.

Thorsten Fröhlich commented on Sunday, 20 June 2010, 06:07 GMT

I am not sure this feature would be useful. Usually files to render have a pov extension and include files have an inc extension. So having a stub pov file that declares some variable would solve the problem.

Mike H commented on Sunday, 20 June 2010, 08:28 GMT

The .inc and .pov naming scheme breaks down for files that can be rendered by themselves as well by inclusion. Please don't suggest a broken solution.

Mike H commented on Friday, 25 June 2010, 21:57 GMT

"Determining if a file should be rendered can be solved with the Declare INI option. Declare some variable there and in every file check for it before including any other file. Undef it as one of the first things in the file, so it remains seen only the the main POV file."

Not sure I follow you. Could you provide an example in SDL?

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing