POV-Ray : Newsgroups : povray.general : Passing macro as parameter : Re: Passing macro as parameter Server Time
30 Apr 2024 11:05:11 EDT (-0400)
  Re: Passing macro as parameter  
From: Bald Eagle
Date: 13 Dec 2021 14:10:00
Message: <web.61b79a1b80f100541f9dae3025979125@news.povray.org>
Alessio Sangalli <man### [at] gmailcom> wrote:
3) do some more animation-related setup and housekeeping
>
> Unfortunately I have not found a way to pass a macro name as parameter
> and be able to call it.


http://www.povray.org/documentation/view/3.7.0/479/


Parse_String(String). This macro takes a string, writes it to a file, and then
includes that file. This has the effect of parsing that string:
"Parse_String("MyColor")" will be seen by POV-Ray as "MyColor".
Parameters:

String = The string to be parsed.



So, the idea is that you pass the macro name as a string parameter, and then
parse that string to turn it into an SDL directive.

If you provide some scene code with some comments describing what you want your
code to do, maybe someone can suggest an alternative method for accomplishing
the same goal.


Post a reply to this message

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