POV-Ray : Newsgroups : povray.general : height_field name in a macro : Re: height_field name in a macro Server Time
5 Jul 2024 09:39:15 EDT (-0400)
  Re: height_field name in a macro  
From: Le Forgeron
Date: 2 Feb 2015 17:27:22
Message: <54cff9ca$1@news.povray.org>
Le 02/02/2015 22:56, Alexis a écrit :
> Here is a simplified version of a macro I wrote:
> 
> #macro my_macro(picture_name)
>   #local my_hf = height_field {picture_name};
>   ...
> #end
> 
> When I call the macro with some picture name :
>   my_macro("the_pict_name")
> I get the following error message :
> 
> "Parse Error: Expected 'map file spec', string identifier found instead"
> 
> I get no error when I replace the line inside the macro with :
> 
>   #local my_hf = height_field {"the_pict_name"};
>   ...
> 
> 
> I've tried to put the picture with my application include files and in other
> folders of my system include files with the same result.
> By the way, I use Pov_Ray 3.7 unofficial on a mac.
> Any idea to solve this problem ?
> 
> Thanks for your help.

Can you try to add the "optional" file type before the filename ?
(if it works, you would need to specialise your macro on file type)

something like

height_field{ png picture_name }


Post a reply to this message

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