|
 |
On 9/8/23 16:16, Bald Eagle wrote:
> #macro Test (startX, startY, targetX, targetY)
> //sphere {0, 0}
> sphere {<startX, startY, 0> 0.1 pigment {rgb z}}
> sphere {<targetX, targetY, 0> 0.1 pigment {rgb y}}
>
> #declare Result = 1;
>
> //Result
>
> #end
>
> #declare myResult = Test (1, 3, 4, 2);
If we flatten the macro call, I believe what is showing up in the scene
at the top is:
//---
#declare myResult = sphere {0, 0}
sphere { <1, 3, 0>, 0.1 pigment rgb <0,0,1> }
sphere { <4, 2, 0>, 0.1 pigment rgb <0,1,0> }
$declare Result = 1;
//---
In other words, I think you need a union{} wrap of the spheres inside
that macro - or don't do the assignment to myResult. The additional
sphere prevents the assignment to the myResult identifier from eating
the first non-dummy sphere; it instead eats the dummy one.
Bill P.
Post a reply to this message
|
 |