|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Kenneth" <kdw### [at] gmailcom> wrote:
>
> > I never realized that a macro's result-- object(FOO)-- was a global variable
> > that remained 'alive' in a scene once the macro was invoked.
>
> It has to be, since macros "spit thing out" to be used outside of the macro.
>
Yes, I do grasp that; I think I probably wasn't being very clear with my
questions. What I meant was, I wonder if a macro can actually 'cache' its
contents for use in a scene (not for animation, but just in a regular static
scene.) An example would be this...
#macro MyMacro()
#ifndef(FOO)
#local FOO = pigment{image_map{png "MY_IMAGE.png"}} // #local, not #declare
#else
#end
pigment{FOO}
#end
#for(i,1,10000)
box{0,1
pigment{MyMacro()}
translate i*x
}
#end
Would this *re-load* the image_map 10,000 times into memory... or would it load
only once and 'instantiate' the image_map 9,999 times, with MUCH less memory
use? I guess I need to do an experiment to find out.
Post a reply to this message
|
|