POV-Ray : Newsgroups : povray.pov4.discussion.general : Conditional Directives within the inifile : Re: Conditional Directives within the inifile Server Time
25 Apr 2024 00:34:27 EDT (-0400)
  Re: Conditional Directives within the inifile  
From: clipka
Date: 3 Jun 2011 04:20:58
Message: <4de8996a$1@news.povray.org>
Am 03.06.2011 02:31, schrieb H. Karsten:

> ##########################################################
> Antialias=Off
> Input_File_Name=election.pov
> Initial_Frame=1
> Final_Frame=23
> Display_Gamma=2.0
>
> Width=1440
> Height=115
>
> Declare=FileToImport=2
>
> #switch (FileToImport)
>    #case (1)
>     Output_File_Name=Canditates-01-a
>     Declare=GlobalDivider=20
>     Declare=FramesAtTheEnd=250
>    #break
>    #case (2)
>     Output_File_Name=;02 = Canditates-01-b
>     Declare=GlobalDivider=25
>     Declare=FramesAtTheEnd=250
>    #break
>   ....
>   #end
> ##########################################################

Why wait for POV-Ray 4.0 when you can nest ini files /now/?

     --------------------------------foo.ini
     Antialias=Off
     Input_File_Name=election.pov
     Initial_Frame=1
     Final_Frame=23
     Display_Gamma=2.0

     Width=1440
     Height=115

     candidates.ini[2]

     --------------------------------candidates.ini
     [1]
     Output_File_Name=Canditates-01-a
     Declare=GlobalDivider=20
     Declare=FramesAtTheEnd=250

     [2]
     Output_File_Name=Canditates-01-b
     Declare=GlobalDivider=25
     Declare=FramesAtTheEnd=250

;-)

You can also move the "candidates.ini[2]" line on the command line 
instead, for the benefit of not having to edit the ini file over and 
over again before rendering.


Post a reply to this message

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