|
|
Nieminen Juha wrote:
> Jon A. Cruz <jon### [at] geocitiescom> wrote:
> : Well, the main thing wrong with "object { SphereMacro(15, 1, 1.5, 10) }" is
> : that at least with the way he has his macro defined, it will cause errors in
> : POV-Ray. The object needs the #declared to work.
>
> : But, if his macro were changed to create a single POV-Ray object, then it
> : could be used in such a case. At the moment it creates a set of objects, and
> : not a single object.
>
> I didn't notice that. But declaring will not help either. If the macro
> creates several objects, only the first one will be the value of the
> declared identifier. The rest will be part of the scene by themselves.
> This will show up clearly if you try to use the identifier in two places.
Well, declaring does help. but you're right on some of what is and is not
declared. The main thing is that for his scene, the #declare will work-around the
errors. With it things work; without it things don't.
But a more proper work-around would be
#declare anInstance = union {
SphereMacro( 15, 1, 1.5, 10)
}
object {
anInstance
}
But since we see that we are just adding the "union {" anyway, it makes sense to
place it up in the macro to begin with.
--
"My new computer's got the clocks, it rocks
But it was obsolete before I opened the box" - W.A.Y.
Post a reply to this message
|
|