POV-Ray : Newsgroups : povray.general : Macro Initialization? : Re: Macro Initialization? Server Time
10 Aug 2024 07:12:32 EDT (-0400)
  Re: Macro Initialization?  
From: Philippe Debar
Date: 10 Feb 2000 10:11:39
Message: <38a2d52b@news.povray.org>
"Bill DeWitt" <the### [at] earthlinknet> wrote in message
news:38a2bb1e@news.povray.org...
> I want to call the macro with only those values that are relevant to it's
> present use. For instance...
>
> gadget(knobs)
> gadget(knobs,lights,dials)
> gadget(dials,dial_light,dial_needle,dial_range)
>
>     ... where everything not specified is assumed. This is because I want
to
> make some macros with a couple dozen possible fields and I don't want to
> have to list every one of them every time.
>
>     TIA


A workaround: *.inc files

with scripts like

#ifndef(gadgetKnobs) #declare gadgetKnobs=126; #end

at the beginning.

If there are really many settings, use *.inc files for storing settings
=>
#include "gadgetDefaultSettings 01.inc"
#declare gadgetKnob=1493;
#include "gadget.inc"


Hope this helps


Philippe


Post a reply to this message

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