POV-Ray : Newsgroups : povray.object-collection : I think I'm having trouble with underscores. : Re: I think I'm having trouble with underscores. Server Time
24 May 2024 12:07:52 EDT (-0400)
  Re: I think I'm having trouble with underscores.  
From: Charles C
Date: 15 Oct 2007 12:50:01
Message: <web.47139a1b27705f80c667cf480@news.povray.org>
"Chris B" <c_b### [at] btconnectcomnospam> wrote:
> "Charles C" <nomail@nomail> wrote in message
> news:web.4712f18227705f80b87ba68c0@news.povray.org...
> > "Chris B" <c_b### [at] btconnectcomnospam> wrote:
> > One question is, what to do about something like this?  I copied the
> > View_POV_Include_Stack line from what's in a lot of the POV-Ray distro
> > #includes.  If fully compliant, the variable needs ScaleConvert_ at the
> > beginning but to be meaninful it needs to match what's in other #includes:
> >
> > #ifdef(ScaleConvert_View_POV_Include_Stack)  #debug "including
> > scaleconvert.incn" #end
> >
> > versus:
> >
> > #ifdef(View_POV_Include_Stack)  #debug "including scaleconvert.incn" #end
> >
> >
> > Thanks again,
> > Charles
> >
> I was probably a little over zealous there in my edits. I 'm sure we will
> need to document a couple of 'exceptions', such as this one, where variables
> do need a cross-file context. The server doesn't check variable names etc.
> within the file which is why it relies upon the contributor making an
> assessment about the level of compliance of their contribution.
> Regards,
> Chris B.

Sounds good.  What I ended up doing was putting in both lines with the
non-prefixed version commented out.

Here's another possible one, but I'll understand if people don't go for it.
Actually I'd be more surprised if people do:   I'd like to propose an
exception for something like Main_POV_File or Main_Scene_File as a
globally-ok string variable.   (A few months ago I proposed a POV-Ray
keyword main_pov_file or main_scene_file or similar with a similar
purpose.)  The purpose of the variable-version of this would be to make it
easier to create self-demonstrating or renderable #includes using a system
which can easily be disabled by default. (..by including the line:
#declare Main_Scene_File = "I don't use this system." which must be
commented out before it will trigger the include file to create an instance
of the object, camera, lightsource etc.)  If using this system, no edits of
#if(1) #end toggles are necessary, and you can easily go back and forth
between using the include file as an include file, or using it as a
self-rendering file.


Post a reply to this message

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