|
|
Am 23.08.2016 um 22:11 schrieb LanuHum:
> "Mr" <nomail@nomail> wrote:
>> Hi!
>> Is there a way for official pov or any other branch/patched verion, to read a
>> pov scene from Python string in RAM...?
>>
>> (either directly or maybe using something like this?
>> http://docs.python.org/3/library/io.html#io.StringIO )
>>
>> Instead of having to write and read from the text file to disk, it would
>> probably make my exporter much faster for small scenes.
>
> It is not required. Required to render an external file instead ate
> one-dimensional array of string variables.
> char *povfile[] = {"#version", "3.7", "background","{","color"...and so on};
>
> As the file can be written in one line, and the python can transmit the exact
> same string.
> Developers only need to specify how to count?
> From a file or from a file.
> Oh array in english is file? Your language does not even see the difference.
> :)))))))
No, array in English is not file. It is not the language that fails to
see the difference, but your translation software :P
> I see a simple desire
Hmm... I guess one way to approach this could be to allow the source
"file" to be read from the standard input stream.
Up to now that wasn't a realistic option, because you can't rewind the
standard input stream, and therefore neither loops nor macros would work.
However, now that I've implemented cached macros, which works by parsing
from a memory buffer rather than a file, it would be comparatively easy
to apply the same mechanism to cache an entire file -- or the standard
input stream, for that matter.
Unfortunately that approach probably only works for a console version,
not the current Windows binaries. Reading from the standard input stream
in Windows GUI programs seems to be non-trivial.
Post a reply to this message
|
|