I analyzed the crash with gdb and PyImport_AddModule ("__main__") in Python/import.c:320 seems responsible for the crash: apparently, "__main__" is not found and causes the error "No such file or directory".
I have to figure out what's wrong with the current configuration, especially whether Freestyle's PythonInterpreter can be used as is. I am going to see whether it's just quicker to use Blender's functions.
39 lines
605 B
C++
39 lines
605 B
C++
|
|
#include "AppGLWidget.h"
|
|
#include "Controller.h"
|
|
#include "AppConfig.h"
|
|
#include "test_config.h"
|
|
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void FRS_execute() {
|
|
cout << "Freestyle start" << endl;
|
|
|
|
Config::Path pathconfig;
|
|
Controller *c = new Controller;
|
|
AppGLWidget *view = new AppGLWidget;
|
|
|
|
c->SetView(view);
|
|
|
|
c->Load3DSFile( TEST_3DS_FILE );
|
|
|
|
c->InsertStyleModule( 0, TEST_STYLE_MODULE_FILE );
|
|
c->toggleLayer(0, true);
|
|
c->ComputeViewMap();
|
|
|
|
c->DrawStrokes();
|
|
|
|
cout << "Freestyle end" << endl;
|
|
|
|
}
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|