+ Selection handling of Python view providers

This commit is contained in:
wmayer 2013-10-26 22:15:20 +02:00
parent 6d8f51f92a
commit fd9fb9481e

View File

@ -47,6 +47,7 @@
# include <Inventor/sensors/SoNodeSensor.h> # include <Inventor/sensors/SoNodeSensor.h>
# include <Inventor/SoPickedPoint.h> # include <Inventor/SoPickedPoint.h>
# include <Inventor/actions/SoRayPickAction.h> # include <Inventor/actions/SoRayPickAction.h>
# include <Inventor/details/SoDetail.h>
#endif #endif
#include "ViewProviderPythonFeature.h" #include "ViewProviderPythonFeature.h"
@ -375,7 +376,8 @@ SoDetail* ViewProviderPythonFeatureImp::getDetail(const char* name) const
Py::Object det(method.apply(args)); Py::Object det(method.apply(args));
void* ptr = 0; void* ptr = 0;
Base::Interpreter().convertSWIGPointerObj("pivy.coin", "SoDetail *", det.ptr(), &ptr, 0); Base::Interpreter().convertSWIGPointerObj("pivy.coin", "SoDetail *", det.ptr(), &ptr, 0);
return reinterpret_cast<SoDetail*>(ptr); SoDetail* detail = reinterpret_cast<SoDetail*>(ptr);
return detail ? detail->copy() : 0;
} }
} }
} }