soc-2008-mxcurioni: Big update. Finally works (links and compiles). So far, the following steps work:
1. instantiates the config path, the controller and the view 2. sets the controller’s view 3. loads a 3ds file (right now a fixed file) 4. inserts a style module (right now, also fixed) 5. computes the view map The next and final step is running the Python script. A lot of information are fixed and should be changed to test the following code: see source/blender/freestyle/app_blender/*.cpp and search for fixed paths (starting in /Users/). I am currently evaluating whether it's worth making Python run on its own environment (right now, the program crashes because of PyImport_AddModule) or whether it should use Blender's Python capabilities. Also, I need to figure out how to integrate the SWIG wrapper dynamic library into the current scheme.
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
|
||||
#include "AppGLWidget.h"
|
||||
#include "Controller.h"
|
||||
#include "AppConfig.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
@@ -8,11 +12,23 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
void FRS_execute() {
|
||||
cout << "Freestyle" << endl;
|
||||
cout << "Freestyle start" << endl;
|
||||
|
||||
Config::Path pathconfig;
|
||||
Controller *c = new Controller;
|
||||
AppGLWidget *view = new AppGLWidget;
|
||||
|
||||
c->SetView(view);
|
||||
|
||||
//c->Load3DSFile( "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/models/teapot.3DS" );
|
||||
c->Load3DSFile( "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/models/teapot.3DS" );
|
||||
|
||||
c->InsertStyleModule( 0, "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/style_modules/contour.py" );
|
||||
c->toggleLayer(0, true);
|
||||
c->ComputeViewMap();
|
||||
|
||||
//c->DrawStrokes();
|
||||
|
||||
cout << "Freestyle end" << endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user