|
|
I need help with an include file I'm writing. I'm getting an error depending
on where I place an object statement in the include file.
The file rubik.pov reads
#include "colors.inc"
#include "rubik.inc"
camera {
location <-2, 4, -3>
look_at <1.5,1.5,1.5>
}
light_source {
<-2,4,-3>
color White
adaptive 1
jitter
spotlight
radius 10
falloff 20
tightness 20
point_at <0,0,0>
shadowless
}
// */
object{ cube_init() }
the rubik.inc reads
#macro cube_init ()
#declare Front =
box{
<0,0,0>,
<1,1,.000001>
texture {pigment{image_map{"Front.bmp" map_type 0}} scale 1}
scale 3
}
#declare Count=1;
#while (Count <= 5)
//object{ Front }
#declare Count=Count+1;
#end
//object{ Front }
#end
When the object{ Front } is placed outside the while loop everything works
fine. When it is placed inside the loop, I get the following error.
"Parse Error: No matching } in 'object', object found instead"
-Jeff
Post a reply to this message
|
|
|
|
What you are trying to do is this:
object
{ object { ... }
object { ... }
object { ... }
object { ... }
object { ... }
}
That's not possible.
If you want to make a group of objects, which is then handled as one
object, you have to put them into a union, like this:
union
{ #declare Count = 0;
#while(Count < 5)
object { ... }
#declare Count = Count + 1;
#end
}
--
- Warp
Post a reply to this message
|
|