Plug-ins

Andreas Zehender zehender at kde.org
Mon Dec 29 19:29:30 CET 2003


Hi Leon!

On Monday, 29. December 2003 05:45, Leon Pennington wrote:
> Hi everyone,
>
> As its a bit quiet at the moment, because of the feature freeze, I though
> I'd work on the Landscape plug-in. Only preliminary stuff so for but a
> little screen-shot is here: http://www.leonscape.co.uk/linux/Plugin_01.png
>
> I'm still working on the basic functions, but hopefully it will be complete
> in time for the next release.

Please send me your current code.

As you know the plugin framework is not completely finished yet, so you may 
need to add hacks and workarounds to the plugin.

> There was no way to access the format before its serialised. So I hacked in
> a  signal:
>
> PMPovray35Format format;
> emit aboutToSerialise( &format );
> PMSerializer* dev = format.newSerializer( &buffer );

No, I will add a member to the serializer that points to the corresponding 
format.

Why do you need to access the format before serialization? The serialization 
method should be registered once at plugin loading time.

> before its serialised, but there is a problem. I need to export an image,
> so I  need to know from the part what the filename of the export is going
> to be, as  a temporary file isn't going to be much use. So I added an extra
> argument to the signal ( with a default value of QString::null ), and then
> added it to the slotFileExport function.

Hmm, there are some problems.

When exporting a scene, the file name is known before serialization. But when 
a scene is rendered, the scene is serialized into a buffer. The povray render 
widget saves this data to a temp file after serialization, not the part.

And the file can be a remote file on a ftp server, it does not need to be a 
local file. Don't you think it would be an option to generate the landscape 
as a mesh with (smooth?) triangles?

Greetings, Andreas

-- 
--------------------------------------------------
 Andreas Zehender
 Master of Computer Science, Dipl. Ing. (BA)
 http://www.azweb.de
 az at azweb.de | zehender at kde.org      
--------------------------------------------------


More information about the kpovmodeler-devel mailing list