|
![](/i/fill.gif) |
Warp wrote:
> #declare Index = 0;
> #while(Index < 10000)
> #declare TheObject = sphere { <Index, 0, 0>, 1 pigment { rgb 1 } };
> ... (do something with TheObject) ...
> #declare Index = Index+1;
> #end
>
> How many warnings do you get?
>
#local index = 0;
#while (index < 10000)
#local TheObject = sphere { <index, 0, 0>, 1 pigment {rgb 1} };
... (do something with TheObject) ...
#local index = index+1;
#end
No warnings at all :)
That's why I said it would take some work to get a lot of the current
include files to work with this; of course, the behavior could be
switched off via a command-line option (or an ini file option).
Basically, you would only use #declare for items that truly need to be
global in scope, rather than using it out of habit. Of course, I also
like the idea I put forward of container objects, but this seemed like
an easier solution to implement.
...Chambers
Post a reply to this message
|
![](/i/fill.gif) |