Re: [pygccxml-development] Indexing suite exception
Brought to you by:
mbaas,
roman_yakovenko
|
From: Matthias B. <ba...@ir...> - 2006-06-19 15:04:32
|
Roman Yakovenko wrote:
>> Is this a bug in pyplusplus or do I have to specify anything related to
>> this in my driver script?
>
> Cache !!! :-(((( We need to implement some mechanizm that will prevent
> this in future.
Argh, yes, sorry! (maybe it would be possible to store some sort of
signature of the classes (such as the number of attributes) and compare
this signature with the signature of the imported classes....?)
Now the script runs fine but there's an error during compilation. What
puzzles me is that the methods that seem to trigger the error have not
been wrapped with the previous version of pyplusplus (even if they
should have been, I was not ignoring them).
For example, it's a method like this:
bool MFnMesh::closestIntersection ( const MFloatPoint & raySource, const
MFloatVector & rayDirection, const MIntArray * faceIds, const MIntArray
* triIds, bool idsSorted, MSpace::Space space, float maxParam, bool
testBothDirections, MMeshIsectAccelParams *accelerator, MFloatPoint &
hitPoint, float* hitRayParam, int* hitFace, int* hitTriangle, float*
hitBary1, float* hitBary2, float tolerance = 1e-6, MStatus *
ReturnStatus = NULL )
which is now turned into the following code:
MFnMesh_exposer.def("closestIntersection"
, &::MFnMesh::closestIntersection
, ( bp::arg("raySource"), bp::arg("rayDirection"),
bp::arg("faceIds"), bp::arg("triIds"), bp::arg("idsSorted"),
bp::arg("space"), bp::arg("maxParam"), bp::arg("testBothDirections"),
bp::arg("accelerator"), bp::arg("hitPoint"), bp::arg("hitRayParam"),
bp::arg("hitFace"), bp::arg("hitTriangle"), bp::arg("hitBary1"),
bp::arg("hitBary2"),
bp::arg("tolerance")=9.99999999999999954748111825886258685613938723691e-7,
bp::arg("ReturnStatus")=bp::object() )
, bp::default_call_policies() );
Compiling this results in a lengthy and somewhat difficult to read error
message. The actual error goes something like this:
/sw/i386_linux-2.0_glibc2/boost-1.33.1/include/boost-1_33_1/boost/python/class.hpp:536:
error: no
matching function for call to `get_signature(bool (MFnMesh::*&)(const
MFloatPoint&, const MFloatVector&, const MIntArray*, const
MIntArray*, bool,
MSpace::Space, float, bool, MMeshIsectAccelParams*, MFloatPoint&,
float*,
int*, int*, float*, float*, float, MStatus*), MFnMesh*)'
/sw/i386_linux-2.0_glibc2/boost-1.33.1/include/boost-1_33_1/boost/python/class.hpp:
In
member function `void boost::python::class_<T, X1, X2,
X3>::def_impl(T*,
const char*, Fn, const Helper&, ...) [with T = MFnMesh, Fn = bool
(MFnMesh::*)(const MFloatPoint&, const MFloatVector&, const MIntArray*,
const MIntArray*, bool, MSpace::Space, float, bool,
MMeshIsectAccelParams*,
bool, MFloatPointArray&, MFloatArray*, MIntArray*, MIntArray*,
MFloatArray*,
MFloatArray*, float, MStatus*), Helper =
boost::python::detail::def_helper<boost::python::detail::keywords<18>,
boost::python::default_call_policies,
boost::python::detail::not_specified,
boost::python::detail::not_specified>, W = MFnMesh_wrapper, X1 =
boost::python::bases<MFnDagNode, mpl_::void_, mpl_::void_, mpl_::void_,
mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_,
mpl_::void_>, X2 = boost::python::detail::not_specified, X3 =
boost::python::detail::not_specified]':
So what is wrong with this method? (are there too many arguments? are
there some required policies missing?)
And another question is why was this ignored in previous versions? Which
modification of pyplusplus has changed that?
- Matthias -
|