Hi Nian,
I have to specify the class :
instead of
void ConvertChildren( KFbxNode* pRoot, const KFbxSystemUnit& pSrcUnit,
const KFbxUnitConversionOptions& pOptions = DefaultConversionOptions )
const;
try
void ConvertChildren( KFbxNode* pRoot, const KFbxSystemUnit& pSrcUnit,
const KFbxUnitConversionOptions& pOptions =
KFbxSystemUnit::DefaultConversionOptions ) const;
Regards,
SEB
Nian Wu wrote:
> Hi,
>
> I am wrapping our C++ library with SIP. I met a compile failure when I
> wrapped a class, the sip script is like:
>
> class KFbxSystemUnit
> {
>
> %TypeHeaderCode
> #include <fbxsdk.h>
> %End
>
> public:
> struct KFbxUnitConversionOptions
> {
> bool mConvertLightIntensity;
> bool mConvertRrsNodes;
> };
>
> KFbxSystemUnit(double pScaleFactor, double pMultiplier = 1.0);
> ~KFbxSystemUnit();
> static const KFbxUnitConversionOptions DefaultConversionOptions;
> void ConvertChildren( KFbxNode* pRoot, const KFbxSystemUnit& pSrcUnit,
> const KFbxUnitConversionOptions& pOptions = DefaultConversionOptions ) const;
> };
>
> The argument "pOptions" of method "ConvertChildren" has default value which
> is a static class member.
>
> After run sip, the method "ConvertChildren" is wrapped as following:
> ====================================================================================
> 1 extern "C" {static PyObject *meth_KFbxSystemUnit_ConvertChildren(PyObject
> *, PyObject *);}
> 2 static PyObject *meth_KFbxSystemUnit_ConvertChildren(PyObject
> *sipSelf,PyObject *sipArgs)
> {
> 3 int sipArgsParsed = 0;
>
> {
> 4 KFbxNode * a0;
> 5 const KFbxSystemUnit * a1;
> 6 const KFbxSystemUnit::KFbxUnitConversionOptions& a2def =
> DefaultConversionOptions;
> 7 const KFbxSystemUnit::KFbxUnitConversionOptions * a2 = &a2def;
> 8 KFbxSystemUnit *sipCpp;
>
> 9 if
> (sipParseArgs(&sipArgsParsed,sipArgs,"BJ8J9|J9",&sipSelf,sipType_KFbxSystemUnit,&sipCpp,sipType_KFbxNode,&a0,sipType_KFbxSystemUnit,&a1,sipType_KFbxSystemUnit_KFbxUnitConversionOptions,&a2))
> {
> 10 sipCpp->ConvertChildren(a0,*a1,*a2);
>
> 11 Py_INCREF(Py_None);
> 12 return Py_None;
> }
> }
>
> /* Raise an exception if the arguments couldn't be parsed. */
> sipNoMethod(sipArgsParsed,sipName_KFbxSystemUnit,sipName_ConvertChildren);
>
> return NULL;
> }
> =====================================================
>
> Please notice the Line 6, the variable " DefaultConversionOptions" is
> referred as global variable, so compile failed here.
>
> Thanks,
> Nian Wu
>
>
> _______________________________________________
> PyQt mailing list [email protected]
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
begin:vcard
fn;quoted-printable:S=C3=A9bastien Petitdemange
n;quoted-printable:Petitdemange;S=C3=A9bastien
email;internet:[email protected]
tel;work:1994
x-mozilla-html:TRUE
version:2.1
end:vcard
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt