← Back to team overview

hugin-devs team mailing list archive

[Bug 799905] Re: Variables not passed to Python interface

 

With verbose outputs activated (#define HPI_VERBOSE) and one more print
statement

    fprintf ( stderr, "HPI: type query yielded %p\n" ,  swigtype );

after the call to SWIG_Python_TypeQuery() to display the result of the
type query, I get this diagnostic output for the creation of the
arguments in hpi_classes.cpp:

HPI: making a PyString from '/home/kfj/src/hugin/hpi15/hugin.hg/src/hugin_script_interface/plugins-dev/plugin_skeleton.py'
HPI: making a HuginBase::Panorama* from 0x91167b4
HPI: type query yielded 0x3b83158
HPI: making a HuginBase::UIntSet* from 0xbfdc42c0
HPI: type query yielded 0x3b83158                                  <<<< same value coming back from SWIG_Python_TypeQuery
HPI: calling hpi_dispatch

This is worrying, because the type strings passed to
SWIG_Python_TypeQuery are different, yet the same swig type is returned
(the pointer has the same numeric value). This looks like as if
SWIG_Python_TypeQuery was failing. That's the routine provided by swig
to pick the proper python object by name.I'll look at it tomorrow
morning.

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/799905

Title:
  Variables not passed to Python interface

Status in Hugin - Panorama Tools GUI:
  Confirmed

Bug description:
  Trying to pass several variables to Python script does not work.
  I'm calling hpi::callhpi with 2 argument
  hpi::callhpi( m_scriptFile.c_str() , 2 , "HuginBase::Panorama*", &pano, "HuginBase::UIntSet*", &m_images ) ;

  But in hpi_dispatch 2 HuginBase::Panorama* objects appear (and not a Panorama and UIntSet object)
  I added     
      for i in args:
          print(type(i))
  to hpi_dispatch and got:
  <class 'hsi.Panorama'>
  <class 'hsi.Panorama'>
  as result.

  And finally in the plugin only the first Panorama object appears.
  I added the same code as above to check, there is only one variable in def entry (pano,*args)

To manage notifications about this bug go to:
https://bugs.launchpad.net/hugin/+bug/799905/+subscriptions


References