Hi all!

Continuing my work on interfacing hugin with Python, I have reached
another of my goals: I have figured out how to use plugins written in
Python from programs that use hugin's type corpus - or at least the
subset that is wrapped in the hugin scripting interface. This means
that there is now a possibility to call arbitrary Python code with
objects like HuginBase::Panorama, do some processing on them in Python
and return to the caller. Don't be fooled into thinking this is a mere
'execute a script file' approach: the interface maintains the object-
oriented interface, but the Python code actually accesses and
manipulates the binary data held in the C++ application. What I'd like
to do now is link this code into hugin and test it at it's destined
place. To do so, I need a good point to link it in, and some easy way
of triggering the call to Python with data from hugin.

The code to use Python is encapsulated in two C++ classes that could
either be put straight into a cpp file somewhere or be included as a
header.

I'd welcome some support from the hugin developers here. Also, I don't
intend to provide any GUI elements to deal with plugins (at least for
now), mainly because I don't have wxWidgets experience and don't know
the GUI code, but also because I feel that the GUI isn't really my
domain, I'm more of a backend programmer. Never mind the GUI, having a
breakout option to call Python for quick hacks or rapid prototyping
might be a welcome facility for the developers even without any formal
introduction of a plugin GUI. Since all the terminology for data types
and methods is identical in Python to that in C++, switching to using
Python on the data is easy.

I also need information on what to do if the Python code has modified
hugin's content. I am aware that there are mechanisms to notify the
application of such changes, and I also know that a certain protocol
has to be used to make sure all actions can be undone. What I don't
know is the precise nature of these mechanisms and how to serve them
with appropriate information. Again, help from the developers would be
welcome.

Once I've test-run the code from hugin I'll publish through the usual
channel. So far there has been so little echo to my work that I am
getting the feeling that hardly anyone actually reads my posts or is
at all interested. This is regrettable, since I am certain that my
path to Python integration is opening up very interesting new
possibilities. Let me name but a few:

- plugins can provide glue to closely cooperate with other
applications
- other code can be glued in without having to link it
- code contribution from users is made much easier
- optional functionality can be accessed on on demand
- Python code can be used to do advanced maths (see numpy, SciPy)

Kay

-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx

Reply via email to