Plug-ins

Leon Pennington leon at leonscape.co.uk
Mon Dec 29 20:39:13 CET 2003


On Monday 29 December 2003 18:29, Andreas Zehender wrote:
> 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.
>

Will do, see below.....

> > 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.

Well I've been using format->registerMethod(), but the format is created 
whithin the render code, and my method is obviously not registered. or am I 
missing something? I tried various other ways but this seemed to be the only 
way to get it to work.

>
> > 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?

This of course is possible. and might make more sense, you're giving me 
Ideas.... hmmm. I'll code this up and send it.

> Greetings, Andreas

-- 
Leon Pennington

"The most likely way for the world to be destroyed, most experts agree, is by 
accident. That's where we come in; we're computer professionals. We cause 
accidents." 
 Nathaniel Borenstein. 


More information about the kpovmodeler-devel mailing list