|
|
Am 04.12.2018 um 16:59 schrieb ingo:
> Don't know the proper word for what I do, but the code below fails. Should
> it? Can it be made not to fail?
>
> #declare T = dictionary {
> ["Index"] : array[2]{"Base1", "Base2"},
> ["Base1"] : <1,2,3>,
> ["Base2"] : <0,1,2>
> };
>
> #declare Chain = T["Index"][0];
> #declare Vec = T.Chain;
>
> Parse Error: Cannot pass uninitialized identifier to non-optional LValue.
`T.Chain` is shorthand for `T["Chain"]`. You don't have a key "Chain" in
your dictionary.
What you want is
#declare Vec = T[Chain];
Notice the use of square brackets without quotes. This tells POV-Ray
that the key to use is the content of the variable `Chain`.
Post a reply to this message
|
|