On 28 Jan., 21:11, "T. Modes" <[email protected]> wrote:
> > PS: In Python I can run "import hsi" and then modify the panorama
> > object. But the hugin python interface does not work correctly. It
> > crashes hugin when running a script that works when running directly
> > in python.
>
> After more testing I found the culprit: pano.setImage(0,img)
> When calling from python directly it works. But when the command is
> used inside hugin, hugin is crashing.

I tried here (and, btw, with the downloaded and built-from scratch
code from the mercurial repo, which builds and works fine so far). It
put this code into demo_plugin.py:

def entry ( pano ) :
    ...
    img = hsi.SrcPanoImage ( '/home/kfj/Bilder/2010_10_14/
IMG_0061.tif' )
    pano.setImage(0,img)

And it works as intended. I suspect you might have just opened the
image by writing:

img = SrcPanoImage ( 'whatever' )

Which may work if you have previously done an

import * from hsi

but if demo_plugin doesn't import * from hsi, you have to use the
qualified name:

img = hsi.SrcPanoImage ( 'whatever' )

just guessing... and what sort of crash do you get? just an exception
in python or a proper crash of the hugin application?

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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx

Reply via email to