How to select a particular engine?

I’m writing a python extension that makes use of the “Surfaces” engine.

The problem is that I can’t find a way on how to recognize that it is
exactly the “Surfaces” engine, because the name attribute is localized, it
seems throught a tr() call.
(this is related to the bug
http://sourceforge.net/tracker/?func=detail&aid=3007978&group_id=165310&atid=835077).

It’s a bug or there’s another attribute I can use to select the surfaces
engine?

  • Gabriele

On Sun, Jun 13, 2010 at 5:59 AM, Gabriele Lanaro
gabriele.lanaro@gmail.com wrote:

I’m writing a python extension that makes use of the “Surfaces” engine.

The problem is that I can’t find a way on how to recognize that it is
exactly the “Surfaces” engine, because the name attribute is localized, it
seems throught a tr() call.
(this is related to the bug
http://sourceforge.net/tracker/?func=detail&aid=3007978&group_id=165310&atid=835077
).

It’s a bug or there’s another attribute I can use to select the surfaces
engine?

Looking at the AVOGADRO_ENGINE macro in engine.h, it looks like either
the identifier() or staticIdentifier() calls should give you a
non-translated string (in this case, “Surfaces”).

HTH,
Dave

On Sunday 13 June 2010 08:38:13 David Lonie wrote:

On Sun, Jun 13, 2010 at 5:59 AM, Gabriele Lanaro

gabriele.lanaro@gmail.com wrote:

I’m writing a python extension that makes use of the “Surfaces” engine.

The problem is that I can’t find a way on how to recognize that it is
exactly the “Surfaces” engine, because the name attribute is localized,
it seems throught a tr() call.
(this is related to the bug
http://sourceforge.net/tracker/?func=detail&aid=3007978&group_id=165310&a
tid=835077 ).

It’s a bug or there’s another attribute I can use to select the surfaces
engine?

Looking at the AVOGADRO_ENGINE macro in engine.h, it looks like either
the identifier() or staticIdentifier() calls should give you a
non-translated string (in this case, “Surfaces”).

David is correct - we added non-translated identifiers to plugins to address
this exact issue. You should be able to use these functions, and I believe I
made use of them in Kalzium due to similar issues.

Marcus