|
![](/i/fill.gif) |
I tried on my computer. Only (1) works, and the last two cannot. When
working with the last two approach, same error message was given.
So it seems that i must use #undef temp to ensure temp is an undefined uv
vector variable inside each pass.
Mike Williams <nos### [at] econym demon co uk> wrote:
> Wasn't it lien0n who wrote:
>
> It's actually the "#local temp = <0,0>" line that's freaking it out. The
> #read directive is, for some reason, refusing to read data into a
> variable that currently contains a uv vector.
>
> However, if you omit that line, the #read works the first time (when
> 'temp' is undefined), and happily reads a uv vector into 'temp'. Then on
> the second pass, the #read directive refuses to read data into a
> variable that currently contains the uv vector it read on the previous
> pass.
>
> A few quick tests show that all these workrounds work:
>
> 1. Have 'temp' be undefined whenever the #read is invoked
>
> #local i=0;
> #while (i<Bottom_numUV)
> #read (File,temp)
> temp
> #undef temp
> #local i=i+1;
> #end
>
> 2. Make 'temp' be a float whenever the #read is invoked
>
> #local i=0;
> #while (i<Bottom_numUV)
> #local temp = 0;
> #read (File,temp)
> temp
> #local i=i+1;
> #end
>
> 3. Make 'temp' be a 3-vector whenever the #read is invoked
>
> #local i=0;
> #while (i<Bottom_numUV)
> #local temp = <0,0,0>;
> #read (File,temp)
> temp
> #local i=i+1;
> #end
>
> --
> Mike Williams
> Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |