|
|
Alain <kua### [at] videotronca> wrote:
> >
> > I was doing a simple #if - #else - #end loop and trying to trigger an update
> > once every "hour".
> > #if ( Time1 = ceil ( Time1 ) )
> >
>
> Using such a loop would only work for a *very* long parse operation as
> it can only be evaluated during that time. When rendering or editing
> your scene, the loop is never used.
>
>
> Alain
Well, the parse and render phases are something I need to better understand,
because I long to do cool stuff with functions and macros, and I've seen that
asked plenty of times. Lots of reading and experiments for me.
I used the loop in my render, and it seemed to work fine.
#if ( Time1 = ceil ( Time1 ) )
#declare A = A + B;
#declare B = B + 2;
text { ttf "arial.ttf" str (B, 3, 0) 0.1, 0 translate <Time1-2,
Level1*Y_Factor+2, -0.4> pigment {color Yellow}}
#debug concat ("Time1 = ", str (Time1, 3, 1))
#debug "\n"
#debug concat ("A = ", str (A, 3, 1))
#debug "\n"
#else
#end // end if
once I got the #if comparator right, it worked just like I expected it to.
#if ( Time1 / Step = int (Time1/Step) DID NOT work.
Go figure.
Post a reply to this message
|
|