|
OK so thanks to this thread I was able to get things going with boost. It took a fair bit of fiddling around but do now have the inaugural “hello world” function working.
My next question is about passing data to and from python and C++. Starting with my example of findModelsByAttribute. I am trying to send a component list to the C++ function from python, similar to the FBFindObjectsByName. The error I am getting is “did not match C++ signature” error.
full error is
SampleExporter.findModelsByAttribute("test", lList) Boost.Python.ArgumentError: Python argument types in
SampleExporter.findModelsByAttribute(str, FBComponentList) did not match C++ signature:
findModelsByAttribute(char const * __ptr64, class ORSDK2011::FBArrayTemplate<class ORSDK2011::FBComponent * __ptr64> {lvalue})
If I induce a similar error on FBFindObjectsByName (by mixing the inputs for example) I get
FBFindObjectsByName(lList, "Cube") Boost.Python.ArgumentError: Python argument types in
pyfbsdk.FBFindObjectsByName(FBComponentList, str) did not match C++ signature:
FBFindObjectsByName(char const * __ptr64, class PYFBSDK::FBComponentList_Wrapper {lvalue})
FBFindObjectsByName(char const * __ptr64, class PYFBSDK::FBComponentList_Wrapper {lvalue}, bool)
FBFindObjectsByName(char const * __ptr64, class PYFBSDK::FBComponentList_Wrapper {lvalue}, bool, bool)
Looking at the documentation on FBFindObjectsByName the parameters into the function look the same as my findModelsByAttribute.
FBSDK_DLL void FBFindObjectsByName( const char* pNamePattern, FBComponentList& pList, bool pIncludeNamespace = true, bool pModelsOnly = false );
void findModelsByAttribute(const char* pPropName, FBComponentList& pList)
So my questiuon is why is my function looking for FBArrayTemplate and FBFindObjectsByName is looking for FBComponentList_Wrapper when they are both the looking for a FBComponentList in the function?
|