|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
//--- This #macro creates a simple color_map :
#macro BiColorMap (Coul1,Coul2,Seuil)
color_map {
[0 Coul1]
[Seuil Coul1]
[Seuil Coul2]
[1 Coul2]
}
#end
//--- I want to use it in a layered texture. This works as expected :
#declare T1 = texture {
pigment {gradient x
BiColorMap (Clear,Gray50,.95)
scale 90}
}
#declare T2 = texture {
pigment {gradient z
BiColorMap (Clear,Gray50,.9)
scale 90}
}
#declare T_Paves1 =
texture {pigment {Gray80}}
texture {T1}
texture {T2}
//--- However, this causes an error :
#declare T_Paves2 =
texture {pigment {Gray80}}
texture {pigment {gradient x BiColorMap (Clear,Gray50,.05) scale 90}}
texture {pigment {gradient z BiColorMap (Clear,Gray50,.05) scale 90}}
// it tells me : "Parse Error: No matching } in 'pigment',
macro identifier found instead"
Fabien.
Post a reply to this message
|
|
| |
| |
|
|
From: Thorsten Froehlich
Subject: Re: #macros doesn't work in layered textures
Date: 25 Apr 2002 04:34:08
Message: <3cc7bf80@news.povray.org>
|
|
|
| |
| |
|
|
In article <3CC### [at] skynetbe> , Fabien Mosen
<fab### [at] skynetbe> wrote:
> // it tells me : "Parse Error: No matching } in 'pigment',
> macro identifier found instead"
It works as designed. No macros in layered textures. The problem is that if
a macro would contain a declare the parser could no longer guess that two or
more texture identifiers are supposed to belong to the layered texture and not
some other declare.
Thorsten
____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg
I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
| |
| |
|
|
From: Christoph Hormann
Subject: Re: #macros doesn't work in layered textures
Date: 25 Apr 2002 04:45:42
Message: <3CC7C237.7C5A0751@gmx.de>
|
|
|
| |
| |
|
|
Thorsten Froehlich wrote:
>
> It works as designed. No macros in layered textures. The problem is that if
> a macro would contain a declare the parser could no longer guess that two or
> more texture identifiers are supposed to belong to the layered texture and not
> some other declare.
It would probably be good to mention this in the docs, for example as an
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 20 Apr. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thorsten Froehlich <tho### [at] trfde> wrote:
> It works as designed. No macros in layered textures. The problem is that if
> a macro would contain a declare the parser could no longer guess that two or
> more texture identifiers are supposed to belong to the layered texture and not
> some other declare.
I propose a change in syntax for pov4. Layered textures should be inside
a clearly defined block, thus making it completely unambiguous to both the
parser and the user.
It could be something as simple as:
texture
{ layered texture_map
{ (textures here)
}
}
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |