std::cerr<<"Error Getting plugin pointer for Plugin-ViewControl"<<std::endl;
std::cerr<<"Error converting plugin pointer for Plugin-ViewControl"<<std::endl;
return;
}
...
...
@@ -29,15 +34,170 @@ PYBIND11_EMBEDDED_MODULE(ViewControl, m) {
// On the c++ side we will just return the existing core instance
// and prevent the system to recreate a new core as we need
// to work on the existing one.
view.def(py::init([&plugin](){returnplugin;}));
view.def("viewAll",static_cast<void(ViewControlPlugin::*)()>(&ViewControlPlugin::viewAll),"Change View in all viewers to view whole scene");
view.def("viewAll",static_cast<void(ViewControlPlugin::*)(int)>(&ViewControlPlugin::viewAll),"Change View in given viewer to view whole scene",py::arg("Id of the viewer which should be switched"));
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to set viewing direction (Default is all viewers)?").toLatin1().data())=PluginFunctions::ALL_VIEWERS);
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to set radius (Default is all viewers)?").toLatin1().data())=PluginFunctions::ALL_VIEWERS);
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to rotate (Default is all viewers)?").toLatin1().data())=PluginFunctions::ALL_VIEWERS);
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to translate (Default is all viewers)?").toLatin1().data())=PluginFunctions::ALL_VIEWERS);
QCoreApplication::translate("PythonDocViewControl","Set the draw mode of a viewer").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocViewControl","List of draw modes ( ; separated list ) ").toLatin1().data()),
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to set draw mode (Default is the active viewer)?").toLatin1().data())=PluginFunctions::ACTIVE_VIEWER);
QCoreApplication::translate("PythonDocViewControl"," This function can be used to set the drawmode for an object.").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocViewControl","List of draw modes ( ; separated list ) ").toLatin1().data()),
py::arg(QCoreApplication::translate("PythonDocViewControl","Object ID to set the drawmode on.").toLatin1().data()),
py::arg(QCoreApplication::translate("PythonDocViewControl","Set the draw mode even if its not directly supported by the objects nodes").toLatin1().data())=true);
QCoreApplication::translate("PythonDocViewControl","Get the current viewing direction").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to get viewing direction from (Default is the active viewer)?").toLatin1().data())=PluginFunctions::ACTIVE_VIEWER);
view.def("upVector",&ViewControlPlugin::upVector,
QCoreApplication::translate("PythonDocViewControl","Get the current upVector").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to get upVector from (Default is the active viewer)?").toLatin1().data())=PluginFunctions::ACTIVE_VIEWER);
QCoreApplication::translate("PythonDocViewControl","Get the current eyePosition").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to get eyePosition from (Default is the active viewer)?").toLatin1().data())=PluginFunctions::ACTIVE_VIEWER);
QCoreApplication::translate("PythonDocViewControl","Get the current sceneCenter").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to get scene center from (Default is the active viewer)?").toLatin1().data())=PluginFunctions::ACTIVE_VIEWER);
QCoreApplication::translate("PythonDocViewControl","Set the scene center").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocViewControl","Coordinates of center?").toLatin1().data()),
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to change (Default is all viewers)?").toLatin1().data())=PluginFunctions::ALL_VIEWERS);
py::arg(QCoreApplication::translate("PythonDocViewControl","Viewer id to change (Default is all viewers)?").toLatin1().data())=PluginFunctions::ALL_VIEWERS);
QCoreApplication::translate("PythonDocViewControl","Enable or disable two sided lighting.").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocViewControl","Specifies whether to enable or disable two sided lighting.").toLatin1().data()));
//
// emit setSlotDescription("setObjectDrawMode(QString,int,bool)", "Set the drawMode for an object",
// QString("DrawMode,ObjectID,Force").split(","),
// QString("the drawMode ( ; separated list ),Object id,Apply without checking support(default is true)").split(","));
view.def("translate",&ViewControlPlugin::translate,"Translate Scene",py::arg("Vector for the translation."),py::arg("Viewer id (default is all)")=PluginFunctions::ALL_VIEWERS);