[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14891] branches/soc-2008-mxcurioni/source /blender/freestyle: soc-2008-mxcurioni: uploaded missing files.

Maxime Curioni maxime.curioni at gmail.com
Mon May 19 07:34:34 CEST 2008


Revision: 14891
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14891
Author:   mxcurioni
Date:     2008-05-19 07:34:31 +0200 (Mon, 19 May 2008)

Log Message:
-----------
soc-2008-mxcurioni: uploaded missing files. Still NOT linking so do not use this version yet :(

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript

Added Paths:
-----------
    branches/soc-2008-mxcurioni/source/blender/freestyle/FST_freestyle.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp

Added: branches/soc-2008-mxcurioni/source/blender/freestyle/FST_freestyle.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/FST_freestyle.h	                        (rev 0)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/FST_freestyle.h	2008-05-19 05:34:31 UTC (rev 14891)
@@ -0,0 +1,14 @@
+#ifndef FRS_FREESTYLE_H
+#define FRS_FREESTYLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif	
+	
+	void FRS_execute();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript	2008-05-18 18:47:28 UTC (rev 14890)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript	2008-05-19 05:34:31 UTC (rev 14891)
@@ -63,8 +63,9 @@
 				sources=sources,
                 includes=Split(incs),
                 defines=defs,
-				libtype=['player'],
-                priority = [280] )
+				libtype=['blender'],
+                priority = [25]
+ )
 
 ########################################################
 # SWIG

Added: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.cpp	                        (rev 0)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.cpp	2008-05-19 05:34:31 UTC (rev 14891)
@@ -0,0 +1,124 @@
+//
+//  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+//   with this source distribution. 
+//
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License
+//  as published by the Free Software Foundation; either version 2
+//  of the License, or (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AppConfig.h"
+#include <iostream>
+
+#include "../system/StringUtils.h"
+
+using namespace std;
+
+namespace Config{
+  Path* Path::_pInstance = 0;
+  Path::Path(){
+    // get the home directory
+    _HomeDir = getEnvVar("HOME");
+    // get the root directory
+    setRootDir(getEnvVar("FREESTYLE_DIR"));
+    //setRootDir(QString("."));
+    _pInstance = this;
+  }
+  void Path::setRootDir(const string& iRootDir){
+    _ProjectDir = iRootDir;
+    _ModelsPath = "";
+    _PatternsPath = _ProjectDir +
+					     string(DIR_SEP.c_str()) +
+					     "data" +
+					     string(DIR_SEP.c_str()) +
+					     "textures" +
+					     string(DIR_SEP.c_str()) +
+					     "variation_patterns" +
+					     string(DIR_SEP.c_str());
+    _BrushesPath = _ProjectDir +
+					     string(DIR_SEP.c_str()) +
+					     "data" +
+					     string(DIR_SEP.c_str()) +
+					     "textures" +
+					     string(DIR_SEP.c_str()) +
+					     "brushes" +
+					     string(DIR_SEP.c_str());
+    _PythonPath = _ProjectDir + 
+              string(DIR_SEP.c_str()) + 
+              "python" + 
+              string(PATH_SEP.c_str()) +
+              _ProjectDir +
+					    string(DIR_SEP.c_str()) +
+              "style_modules" +
+              string(DIR_SEP.c_str()) ;
+    if (getenv("PYTHONPATH")) {
+      _PythonPath += string(PATH_SEP.c_str()) + string(getenv("PYTHONPATH"));
+    }
+#ifdef WIN32
+    _BrowserCmd = "C:\\Program Files\\Internet Explorer\\iexplore.exe %s";
+#else
+    _BrowserCmd = "mozilla %s";
+#endif
+    _HelpIndexPath = _ProjectDir +
+					  string(DIR_SEP.c_str()) +
+					  "doc" +
+					  string(DIR_SEP.c_str()) +
+					  "html" +
+					  string(DIR_SEP.c_str()) +
+					  "index.html";
+    _PapersDir = _ProjectDir +
+					  string(DIR_SEP.c_str()) +
+					  "data" +
+					  string(DIR_SEP.c_str()) +
+					  "textures" +
+					  string(DIR_SEP.c_str()) +
+					  "papers" +
+					  string(DIR_SEP.c_str());
+    _EnvMapDir = _ProjectDir +
+				   string(DIR_SEP.c_str()) +
+				   "data" +
+				   string(DIR_SEP.c_str()) +
+				   "env_map" +
+				   string(DIR_SEP.c_str());
+    _MapsDir = _ProjectDir +
+				   string(DIR_SEP.c_str()) +
+				   "data" +
+           string(DIR_SEP.c_str()) +
+				   "maps" +
+				   string(DIR_SEP.c_str());
+  }
+  void Path::setHomeDir(const string& iHomeDir){
+    _HomeDir = iHomeDir;
+  }
+  Path::~Path(){
+    _pInstance = 0;
+  }
+  Path* Path::getInstance() {
+    return _pInstance;
+  }
+  string Path::getEnvVar(const string& iEnvVarName){
+    string value;
+	if (!getenv( StringUtils::toAscii(iEnvVarName).c_str() ) ) {
+      cerr << "Warning: You may want to set the $"<< StringUtils::toAscii(iEnvVarName)
+		  << " environment variable to use " << string(Config::APPLICATION_NAME) << "." << endl
+	    << "         Otherwise, the current directory will be used instead." << endl;
+      value = ".";
+    }else{
+      value = getenv( StringUtils::toAscii(iEnvVarName).c_str()  );
+    } 
+    return value;
+  }
+
+} // End of namepace Config
+


Property changes on: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.cpp
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.h	                        (rev 0)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.h	2008-05-19 05:34:31 UTC (rev 14891)
@@ -0,0 +1,111 @@
+//
+//  Filename         : AppConfig.h
+//  Author           : Emmanuel Turquin
+//  Purpose          : Configuration file
+//  Date of creation : 26/02/2003
+//
+///////////////////////////////////////////////////////////////////////////////
+//
+//  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+//   with this source distribution. 
+//
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License
+//  as published by the Free Software Foundation; either version 2
+//  of the License, or (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef  APP_CONFIG_H
+# define APP_CONFIG_H
+
+# include <string>
+# include "../system/FreestyleConfig.h"
+# include "../system/Precision.h"
+
+using namespace std;
+
+namespace Config {
+
+  class Path{
+  protected:
+    static Path * _pInstance;
+    string _ProjectDir;
+    string _ModelsPath;
+    string _PatternsPath;
+    string _BrushesPath;
+    string _PythonPath;
+    string _BrowserCmd;
+    string _HelpIndexPath;
+    string _PapersDir;
+    string _EnvMapDir;
+    string _MapsDir;
+    string _HomeDir;
+  public:
+    Path();
+    virtual ~Path();
+    static Path* getInstance();
+
+    void setRootDir(const string& iRootDir) ;
+    void setHomeDir(const string& iHomeDir) ;
+
+    const string& getProjectDir() const {return _ProjectDir;}
+    const string& getModelsPath() const {return _ModelsPath;}
+    const string& getPatternsPath() const {return _PatternsPath;}
+    const string& getBrushesPath() const {return _BrushesPath;}
+    const string& getPythonPath() const {return _PythonPath;}
+    const string& getBrowserCmd() const {return _BrowserCmd;}
+    const string& getHelpIndexpath() const {return _HelpIndexPath;}
+    const string& getPapersDir() const {return _PapersDir;}
+    const string& getEnvMapDir() const {return _EnvMapDir;}
+    const string& getMapsDir() const {return _MapsDir;}
+    const string& getHomeDir() const {return _HomeDir;}
+
+    static string getEnvVar(const string& iEnvVarName);
+    
+  };
+
+  //
+  // Configuration, default values
+  //
+  //////////////////////////////////////////////////////////////
+
+  // Application
+  static const string APPLICATION_NAME("APPNAME");
+  static const string APPLICATION_VERSION("APPVERSION");
+
+  // ViewMap
+  static const string VIEWMAP_EXTENSION("vm");
+  static const string VIEWMAP_MAGIC("ViewMap File");
+  static const string VIEWMAP_VERSION("1.9");
+
+  // Style modules
+  static const string STYLE_MODULE_EXTENSION("py");
+  static const string STYLE_MODULES_LIST_EXTENSION("sml");
+
+  // Options
+  static const string OPTIONS_DIR("." + APPLICATION_NAME);
+  static const string OPTIONS_FILE("options.xml");
+  static const string OPTIONS_CURRENT_DIRS_FILE("current_dirs.xml");
+  static const string OPTIONS_QGLVIEWER_FILE("qglviewer.xml");
+
+  // Default options
+  static const real DEFAULT_SPHERE_RADIUS = 1.0;
+  static const real DEFAULT_DKR_EPSILON = 0.0;
+
+  // Papers
+  static const string DEFAULT_PAPER_TEXTURE("whitepaper.jpg");
+
+
+} // End of namepace Config
+
+#endif // APP_CONFIG_H


Property changes on: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.h
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp	                        (rev 0)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp	2008-05-19 05:34:31 UTC (rev 14891)

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list