POV-Ray : Newsgroups : povray.unofficial.patches : Megapovplus glows : Allowing a scene with only glow, no lights or objects [was Re: Megapovplus glows] Server Time
1 Sep 2024 22:17:18 EDT (-0400)
  Allowing a scene with only glow, no lights or objects [was Re: Megapovplus glows]  
From: smellenbergh
Date: 28 Sep 2000 15:09:56
Message: <1eholl7.1p4rshl10jgqbeN%smellenbergh@skynet.be>
> > We fixed that one for MegaPov 0.6. A small fix is still needed for a
> > simular problem.
> 
> What was the problem?
First of all, in parse.c in function Parse() change things like this
(and this is for that last little fix mentioned):

  Parse_Frame ();

  Post_Media(Frame.Atmosphere);

#ifdef GlowPatch
  if (Frame.Objects == NULL && Frame.Glows == NULL)
  {
    Error ("No objects or glows in scene.");
  }
#else
  if (Frame.Objects == NULL)
  {
    Error ("No objects in scene.");
  }
#endif
  Stage = STAGE_CLEANUP_PARSE;

This makes it possible to render a scene with no objects, no lights but
only glows.
To allow parsing you should modify Parse_Frame() in parse.c like this
(at the end of the function):

#ifdef GlowPatch
  /*YS sept 18 2000 
     added this here too to allow 
    for a scene with only glow */
  CASE(GLOW_TOKEN)
    #ifdef UnofficialBlocking
        parseUnofficialFeature(60);
    #endif  
    {
    GLOW * NewGlow = Create_Glow();
    Parse_Glow(NewGlow);
    Add_Glow(NewGlow);
  }
  END_CASE
#endif

     OTHERWISE
       UNGET
       Object = Parse_Object();
       if (Object == NULL)
         Parse_Error_Str ("object or directive");
       Post_Process (Object, NULL);
       Link_To_Frame (Object);
     END_CASE
   END_EXPECT
  }


Smellenbergh

-- 
e-mail:sme### [at] skynetbe

http://users.skynet.be/smellenbergh


Post a reply to this message

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