soc-2008-mxcurioni: removed static dependencies (formerly fixed in app_blender/test_config.h). From now on, to use the branch, one needs to define a FREESTYLE_BLENDER_DIR environment variable to point to the Freestyle directory source/blender/freestyle
This commit is contained in:
@@ -18,8 +18,6 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "test_config.h"
|
||||
|
||||
#include "AppConfig.h"
|
||||
#include <iostream>
|
||||
|
||||
@@ -34,10 +32,8 @@ namespace Config{
|
||||
_HomeDir = getEnvVar("HOME");
|
||||
// get the root directory
|
||||
//soc
|
||||
//setRootDir(getEnvVar("FREESTYLE_BLENDER_DIR"));
|
||||
setRootDir( TEST_ROOT_DIR );
|
||||
setRootDir(getEnvVar("FREESTYLE_BLENDER_DIR"));
|
||||
|
||||
//setRootDir(QString("."));
|
||||
_pInstance = this;
|
||||
}
|
||||
void Path::setRootDir(const string& iRootDir){
|
||||
|
||||
@@ -64,8 +64,6 @@
|
||||
|
||||
#include "../system/StringUtils.h"
|
||||
|
||||
#include "test_config.h"
|
||||
|
||||
Controller::Controller()
|
||||
{
|
||||
|
||||
@@ -1062,7 +1060,7 @@ void Controller::init_options(){
|
||||
// Default init options
|
||||
|
||||
Config::Path * cpath = Config::Path::getInstance();
|
||||
|
||||
|
||||
// Directories
|
||||
ViewMapIO::Options::setModelsPath( StringUtils::toAscii( cpath->getModelsPath() ) );
|
||||
PythonInterpreter::Options::setPythonPath( StringUtils::toAscii( cpath->getPythonPath() ) );
|
||||
@@ -1079,8 +1077,8 @@ void Controller::init_options(){
|
||||
|
||||
// Papers Textures
|
||||
vector<string> sl;
|
||||
sl.push_back( StringUtils::toAscii( TEST_TEXTURE_FILE ) );
|
||||
TextureManager::Options::setPaperTextures(sl);
|
||||
sl.push_back( StringUtils::toAscii( cpath->getPapersDir() + Config::DEFAULT_PAPER_TEXTURE ) );
|
||||
TextureManager::Options::setPaperTextures( sl );
|
||||
|
||||
// Drawing Buffers
|
||||
setFrontBufferFlag(false);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "AppGLWidget.h"
|
||||
#include "Controller.h"
|
||||
#include "AppConfig.h"
|
||||
#include "test_config.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -28,9 +27,8 @@ extern "C" {
|
||||
|
||||
static Controller *controller = NULL;
|
||||
static AppGLWidget *view = NULL;
|
||||
|
||||
|
||||
void FRS_initialize(){
|
||||
Config::Path pathconfig;
|
||||
|
||||
if( controller == NULL )
|
||||
controller = new Controller;
|
||||
@@ -40,7 +38,8 @@ extern "C" {
|
||||
}
|
||||
|
||||
void FRS_execute(Render* re) {
|
||||
|
||||
|
||||
Config::Path pathconfig;
|
||||
FRS_initialize();
|
||||
|
||||
controller->SetView(view);
|
||||
@@ -51,12 +50,15 @@ extern "C" {
|
||||
view->_camera->setScreenWidthAndHeight(width, height);
|
||||
//view->setCameraState(const float* position, const float* orientation)
|
||||
|
||||
BPY_run_python_script( TEST_3DS_EXPORT );
|
||||
string script_3ds_export = pathconfig.getProjectDir() +
|
||||
Config::DIR_SEP + "python" +
|
||||
Config::DIR_SEP + "3ds_export.py";
|
||||
BPY_run_python_script( const_cast<char *>(script_3ds_export.c_str()) );
|
||||
|
||||
char btempdir[255];
|
||||
BLI_where_is_temp(btempdir,1);
|
||||
string exported_3ds_file = btempdir;
|
||||
exported_3ds_file += "/tmp_scene_freestyle.3ds";
|
||||
exported_3ds_file += Config::DIR_SEP + "tmp_scene_freestyle.3ds";
|
||||
if( BLI_exists( const_cast<char *>(exported_3ds_file.c_str()) ) ) {
|
||||
controller->Load3DSFile( exported_3ds_file.c_str() );
|
||||
}
|
||||
@@ -65,7 +67,10 @@ extern "C" {
|
||||
return;
|
||||
}
|
||||
|
||||
controller->InsertStyleModule( 0, TEST_STYLE_MODULE_FILE );
|
||||
string style_module = pathconfig.getProjectDir() +
|
||||
Config::DIR_SEP + "style_modules" +
|
||||
Config::DIR_SEP + "contour.py";
|
||||
controller->InsertStyleModule( 0, const_cast<char *>(style_module.c_str()) );
|
||||
controller->toggleLayer(0, true);
|
||||
controller->ComputeViewMap();
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#define TEST_STYLE_MODULE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/style_modules/contour.py"
|
||||
|
||||
#define TEST_ROOT_DIR "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle"
|
||||
|
||||
#define TEST_TEXTURE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/textures/papers/whitepaper.jpg"
|
||||
|
||||
|
||||
|
||||
|
||||
#define TEST_3DS_EXPORT "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/python/3ds_export.py"
|
||||
Reference in New Issue
Block a user