|
|
On 19-1-2016 9:27, Jaime Vives Piqueres wrote:
> El 19/01/16 a las 09:13, Thomas de Groot escribió:
>> I want to write a selected /texture_identifier/ (like "T_stone1" for
>> instance) to a file as a string. However, I do not succeed. I
>> thought that Parse_String() would do the trick but it generates an
>> error telling me that it expects a string but sees a
>> texture_identifier instead.
>>
>> What to do? Thanks.
>
> If I read the docs correctly, Parse_String() does just the contrary:
> it takes a string and writes it to a file as an identifier, then
> includes that file.
>
> That is, given the following array...
>
> #declare TexArray =
> array[12]{
> "T_Stone1", "T_Stone2",
> "T_Stone3", "T_Stone4",
> "T_Stone5", "T_Stone6",
> "T_Stone7", "T_Stone8",
> "T_Stone9", "T_Stone10",
> "T_Stone11", "T_Stone12"
> };
>
> ...you would be able to use these as texture identifiers like this:
>
> texture{Parse_String(TexArray[0])}
>
> --
> jaime
The problem is I do not want this, although it could be a solution if
nothing else pops up that is. I would prefer to write the texture
identifier as a text string.
To explain a bit more, I am adapting tiling.inc to include textures
instead of just colours. It is a simple straightforward process where
running the scene is concerned; however, the writing option for this is
more tricky than expected.
--
Thomas
Post a reply to this message
|
|