Re: Blackboard
Andreas Zehender <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kpovmodeler |
|---|---|
| Message-ID | <[email protected]> |
Hi!
On Monday 15 July 2002 15:59, CARVALHO Luis Passos wrote:
> Hello!
>
> In the plugin api, each plugin could have two indicators: plugin type and
> plugin name.
>
> So, a plugin for import/export in povray format can have the type "IO
> Plugin" and name "Povray v3.x"
> A plugin for a new object could have plgin type "New Object" and name "Lens
> Flare" for instance.
I don't think we should limitate a plugin to only add objects or only add
serialisation functionality.
We should support some kind of registration point for each type of
functionality. The PMPrototypeManager for new objects, a PMIOManager for
additional formats and so on.
> When the plugin for the new object initializes, if it implements IO for a
> given format it could do that that through the following:
>
> bool PluginLensFlare::serialize( format, document )
> {
> if( format == "Povray 3.x" )
> {
> printPovrayCode( document );
> return true;
> }
> else if( format == "RenderMan" )
> {
> printRendermanCode( document );
> return true;
> }
> else
> return false;
> }
>
> When the IO plugin needs to serialize an object it calls the serialize
> method of the objects plugin for it's specific format.
Yes.
> It only makes sense to create a new object if you provide a way to
> serialize it in at least one format. If it can't be serialized in one
> plugin the io plugin should ignore the object.
>
> This has one problem however, when the user downloads a new object, it
> won't be clear if the object can be serialized on the format you're using.
The xml format has to be supported. And of course object plugins have to
support other formats themself because the import/export plugins don't know
the new objects.
> Will adding a plugin manager that shows what services each plugin
> implements help?
I think we should add validation to the import/export methods. Each export
plugin can generate errors and warnings. If there are errors or warnings
during export, they are displayed with a proceed/cancel dialog.
That would allow messages like:
Warning: Object "blablub" doesn't support that format
Error: Pigment maps have to contain at least one pigment
The last one would allow us to make additional consistency checks before
exporting to POV-Ray!
Andreas
--
--------------------------------------------------
Andreas Zehender, Dipl. Ing. (BA)
Student, 10th semester computer science
http://www.azweb.de
[email protected] | [email protected]
--------------------------------------------------
List archive and information: http://mail.kde.org/mailman/listinfo/kpovmodeler-devel