|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm trying to declare a macro that defines a layered texture. Here's a
simplified example:
#macro fooTexture()
texture {
pigment { Red }
}
texture {
pigment { Blue }
}
#end //macro fooTexture
Please ignore the fact there's no transmit in the Blue layer... Now, if I
add a #-something to the second layer:
texture {
#declare fooBar=2;
pigment { Blue }
}
or:
texture {
#if ( 0 )
pigment { Blue }
#else
pigment { Green}
#end
}
or add any #'whatevers at all within the second layer, I get a parsing
error: "No matching } in 'texture', # found instead".
But if I do:
#macro fooTexture()
texture {
#declare fooBar=2;
pigment { Red }
}
texture {
pigment { Blue }
}
#end //macro fooTexture
It doesn't complain about #declares in the 1st layer. What up?
-Scott
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi Scott, sorry I can't confirm (RC6, WinXP).
I did experience this kind of error back in v3.1g but that wasn't in macro
form, just the layered texture. I checked your trouble out the way you said,
and also with #declare and #if embedded within both 1st and 2nd layers. So I
don't know why it happens that way for you.
You didn't give your specs so it would be a good idea to let everyone know
which beta and system you are using.
bob h
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"bob h" <omn### [at] charternet> wrote in message
news:3d0d61c7@news.povray.org...
> Hi Scott, sorry I can't confirm (RC6, WinXP).
>
> I did experience this kind of error back in v3.1g but that wasn't in macro
> form, just the layered texture. I checked your trouble out the way you
said,
> and also with #declare and #if embedded within both 1st and 2nd layers. So
I
> don't know why it happens that way for you.
>
> You didn't give your specs so it would be a good idea to let everyone know
> which beta and system you are using.
>
> bob h
Sorry, W2K, RC6. To put a wrapper around the example I provided, I tried
something like this:
object { sphere { < 0,0,0>, 1 fooTexture() } }
Even involking the fooTexture() macro in something as simple as this caused
the parsing error.
-Scott
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Sun, 16 Jun 2002 22:53:35 -0400, "Scott Wasson" <swa### [at] townispcom>
wrote:
> What up?
Have you noticed NOTE in '6.7.6 Layered Textures' chapter ?
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If you mean the last note about using macros inside layered textures, yes.
Except I have it the other way around -- multiple layers in a macro.
Outside of that, hold the phone for a little while, everyone. In my
1100-line scene file I have the problem. I just tried boiling it down to a
40-line test file, and of course it works just fine. :-( Let me start
whittling away huge chunks of my scene file, and I'll report back. Sorry
for bothering everyone prematurely.
-Scott
news:l1nrgu0f6llg8kpbhf52ft3v2vrjsl67ok@4ax.com...
> On Sun, 16 Jun 2002 22:53:35 -0400, "Scott Wasson" <swa### [at] townispcom>
> wrote:
> > What up?
>
> Have you noticed NOTE in '6.7.6 Layered Textures' chapter ?
>
> ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Mon, 17 Jun 2002 09:21:31 -0400, "Scott Wasson" <swa### [at] townispcom>
wrote:
> If you mean the last note about using macros inside layered textures, yes.
Yes. I mean that part.
> Except I have it the other way around -- multiple layers in a macro.
But you said: "if I add a #-something to the second layer".
Every #-something can lead to another #declaration of of layered texture. So
new # breaks previous declaration block and starts another. But previous one
is not finished so it reports an error about it. Sentence in pointed note
describes similiar situation: "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." IIRC This behaviour was
explained many times.
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
No problems with me.
Version 3.5.beta.RC6 win32 (.msvc)
Win98SE, 160MB, Celeron 500
Alf
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Mon, 17 Jun 2002 09:21:31 -0400, "Scott Wasson" <swa### [at] townispcom>
wrote:
> If you mean the last note about using macros inside layered textures, yes.
> Except I have it the other way around -- multiple layers in a macro.
BTW, perhaps the reason why people can't confirm your problem is becouse you
are declaring layered texture while they put it directly to the object. If you
are not sure I'm right and You still think it is a bug you should post a short
part of your scene in two alternative versions.
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
OK, I found the true culprit. I'm using Chris Colefax's explode macros to
blow up a multi-textured object. So I also have:
#declare particle_texture = fooTexture();
...
#include "Explode.inc"
If I comment out the #declare, or don't put #-something inside the 2nd
layer, it works fine. I still don't see any syntax ambiguities. Any clue?
-Scott
"Alf Peake" <alf### [at] peake42freeservecouk> wrote in message
news:3d0de779$1@news.povray.org...
> No problems with me.
>
> Version 3.5.beta.RC6 win32 (.msvc)
> Win98SE, 160MB, Celeron 500
>
> Alf
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Correction:
"Alf Peake" <alf### [at] peake42freeservecouk> wrote in message
news:3d0de779$1@news.povray.org...
> No problems with me.
Now I got one :/
#macro fooTexture()
texture {
pigment { Red }
}
texture {
pigment { Blue }
pigment { Green }
}
#end //macro fooTexture
//object {
sphere { < 0,0,0>, 1 fooTexture() } }
// }
Giving:
# } } <----ERROR
Parse Error: Expected 'object or directive', } found instead
Returned from renderer with error status
and sphere is highlighted.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |