col.prop(rl, "pass_diffuse")
row = col.row()
row.prop(rl, "pass_specular")
- row.prop(rl, "pass_specular_exclude", text="", icon='ICON_X')
+ row.prop(rl, "pass_specular_exclude", text="", icon='X')
row = col.row()
row.prop(rl, "pass_shadow")
- row.prop(rl, "pass_shadow_exclude", text="", icon='ICON_X')
+ row.prop(rl, "pass_shadow_exclude", text="", icon='X')
row = col.row()
row.prop(rl, "pass_ao")
- row.prop(rl, "pass_ao_exclude", text="", icon='ICON_X')
+ row.prop(rl, "pass_ao_exclude", text="", icon='X')
row = col.row()
row.prop(rl, "pass_reflection")
- row.prop(rl, "pass_reflection_exclude", text="", icon='ICON_X')
+ row.prop(rl, "pass_reflection_exclude", text="", icon='X')
row = col.row()
row.prop(rl, "pass_refraction")
- row.prop(rl, "pass_refraction_exclude", text="", icon='ICON_X')
+ row.prop(rl, "pass_refraction_exclude", text="", icon='X')
- row.operator("scene.freestyle_module_remove", icon='ICON_X', text="")
- props = row.operator("scene.freestyle_module_move_up", icon='VICON_MOVE_UP', text="")
+ if rl.freestyle:
+ layout.separator()
+
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="Freestyle:")
+ freestyle = rl.freestyle_settings
+ col.prop(freestyle, "sphere_radius", text="Sphere Radius")
+ col.prop(freestyle, "ridges_and_valleys", text="Ridges and Valleys")
+ col.prop(freestyle, "suggestive_contours", text="Suggestive Contours")
+ col.prop(freestyle, "dkr_epsilon", text="Dkr Epsilon")
+
+ col.operator("scene.freestyle_module_add", text="Add Style Module")
+
+ for i, module in enumerate(freestyle.modules):
+ box = layout.box()
+ box.set_context_pointer("freestyle_module", module)
+ row = box.row(align=True)
+ row.prop(module, "is_displayed", text="")
+ row.prop(module, "module_path", text="")
- props = row.operator("scene.freestyle_module_move_down", icon='VICON_MOVE_DOWN', text="")
++ row.operator("scene.freestyle_module_remove", icon='X', text="")
++ props = row.operator("scene.freestyle_module_move_up", icon='MOVE_UP_VEC', text="")
+ props.active = (i > 0)
++ props = row.operator("scene.freestyle_module_move_down", icon='MOVE_DOWN_VEC', text="")
+ props.active = (i < len(freestyle.modules) - 1)
+
class RENDER_PT_shading(RenderButtonsPanel):
bl_label = "Shading"
sources = env.Glob('intern/*.c')
- incs = '. #/intern/guardedalloc #/intern/memutil ../editors/include ../blenlib ../blenfont ../makesdna'
+ incs = '. #/intern/guardedalloc #/intern/memutil ../editors/include'
+ incs += ' ../blenlib ../blenfont ../makesdna ../windowmanager'
incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna'
incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes'
-incs += ' #/intern/iksolver/extern ../blenloader'
+incs += ' #/intern/iksolver/extern ../blenloader ../freestyle'
incs += ' #/extern/bullet2/src'
incs += ' #/intern/opennl/extern #/intern/bsp/extern'
incs += ' ../gpu #/extern/glew/include'
link_list(fd, &(sce->markers));
link_list(fd, &(sce->transform_spaces));
link_list(fd, &(sce->r.layers));
-
+
+ for(srl= sce->r.layers.first; srl; srl= srl->next) {
+ link_list(fd, &(srl->freestyleConfig.modules));
+ }
+
sce->nodetree= newdataadr(fd, sce->nodetree);
if(sce->nodetree)
direct_link_nodetree(fd, sce->nodetree);
/* handle UI stuff */
WM_cursor_wait(1);
-
+
+ /* inform Freestyle of the context */
+ FRS_set_context(C);
+
/* flush multires changes (for sculpt) */
multires_force_update(CTX_data_active_object(C));
--- /dev/null
- #include "BLI_util.h"
+//
+// 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;
+
+extern "C" {
++ #include "BLI_path_util.h"
+}
+
+namespace Config {
+Path* Path::_pInstance = 0;
+Path::Path() {
+ // get the root directory
+ //soc
+ setRootDir( BLI_gethome_folder("scripts", BLI_GETHOME_ALL) );
+
+ _pInstance = this;
+}
+void Path::setRootDir(const string& iRootDir) {
+ _ProjectDir = iRootDir + string(DIR_SEP.c_str()) + "freestyle";
+ _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())
++ "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";
+ _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 Freestyle." << 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
+
#!/usr/bin/python
Import ('env')
-incs += ' ../include ../blenloader ../../../intern/smoke/extern'
+ sources = env.Glob('intern/source/*.c')
+ raysources = env.Glob('intern/raytrace/*.cpp')
+
+ incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna ../makesrna'
+ incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf'
++incs += ' ../include ../blenloader ../freestyle ../../../intern/smoke/extern'
+
cflags = env['CCFLAGS']
cxxflags = env['CXXFLAGS']