|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 03.12.2018 um 02:06 schrieb Kenneth:
>
> > That 'png' is a keyword (or sort of like one), and I could never figure
> > out a way to get a string construction to 'create' a POV-Ray keyword...
>
> See `Parse_String` macro in `strings.inc`.
Hey, that does work beautifully!
#include "Strings.inc"
image_map{
Parse_String("png") concat("my_image",str(frame_number - 1,-4,0),".png")
(although, I probably wouldn't use it in this *particular* context, as the
keyword png would simply be easier; but it's a great way to generate
keywords in general.) Thanks for the hint!
The macro is a nice one: It simply #writes the string to a file, then
immediately #includes that file back into the SDL code line.
But what baffles me at the moment is why it DOES work, when
image_map{concat("png ","my_image",str(frame_number - 1,-4,0),".png")
does not-- since both constructions involve strings, in what *appears* to be a
similar way.
SO... I'm thinking that the concat keyword is the problem-- not specifically
concat, but that the initial image_map{ expression expects the BITMAP_TYPE to
be the first thing it sees, not some other 'thing'. Not even str("png")
Post a reply to this message
|
|