Commit 48969dd6 authored by Pierre Kraemer's avatar Pierre Kraemer

SCHNApps launching: Python script can be passed as argument

parent bfa7b3da
v0 = schnapps.getView("view_0");
importPlugin = schnapps.enablePlugin("Surface_Import");
surfaceRender = schnapps.enablePlugin("Surface_Render");
v0.linkPlugin(surfaceRender.getName());
handman = importPlugin.importFromFile("/home/kraemer/Media/Data/surface/midRes/handman_34k.off");
v0.linkMap(handman.getName());
handman.createVBO("position");
surfaceRender.changePositionVBO(v0.getName(), handman.getName(), "position");
surfaceRender.changeRenderEdges(v0.getName(), handman.getName(), True);
......@@ -30,9 +30,14 @@ int main(int argc, char* argv[])
schnapps.show();
pythonContext.addObject("schnapps", &schnapps);
QFileInfo fi(app.applicationDirPath() + QString("/schnappsInit.py"));
if(fi.exists())
pythonContext.evalFile(fi.filePath());
if(argc > 1)
{
QString filename(argv[1]);
QFileInfo fi(filename);
if(fi.exists())
pythonContext.evalFile(fi.filePath());
}
splash->finish(&schnapps);
delete splash;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment