POV-Ray : Newsgroups : povray.advanced-users : Problems with #default and #ifdef : Re: Problems with #default and #ifdef Server Time
29 Jul 2024 22:22:30 EDT (-0400)
  Re: Problems with #default and #ifdef  
From: Chris Colefax
Date: 21 Nov 2000 18:14:19
Message: <3a1b01cb@news.povray.org>
Nicolas Calimet <pov### [at] freefr> wrote:
> Long time ago I noticed POV-Ray 3.1g (UNIX) had problems when
> using the following code. Should it be considered as a bug or am I
> missing something ? Also I wonder why it's not possible to use a
> material{} statement in #default{} (but only texture|pigment|finish|
> normal as the docs say).

It would appear that the hash in front of default causes the parser to
execute the directive even though the definition test evaluates to false.
Removing the hashes from the default directives allows the file to work as
expected, e.g.:

   #ifdef (text) default {pigment {rgb test}} #end

In answer to your second question, I would imagine the default directive
uses a texture structure internally, rather than a material structure, as
this is what it was designed for.  A simple workaround, of course, is to
declare your own default material which you apply to all objects.


Post a reply to this message

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