Merged changes in the trunk up to revision 30397.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Thu, 15 Jul 2010 21:05:11 +0000 (21:05 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Thu, 15 Jul 2010 21:05:11 +0000 (21:05 +0000)
1  2 
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/space_outliner/outliner.c
source/blender/python/doc/sphinx_doc_gen.py
source/blender/python/intern/bpy.c
source/creator/CMakeLists.txt
source/creator/creator.c

index 86f4fa0b1035daa7b36ada8462a437b16beed593,536f133c91b848fd7c56476e14ae05ea1b607373..516515ba0141f5ad24dfb80afac0fa0f973173bd
@@@ -174,7 -174,7 +174,7 @@@ REA
                - read associated 'direct data'
                - link direct data (internal and to LibBlock)
  - read FileGlobal
- - read USER data, only when indicated (file is ~/.B.blend or .B25.blend)
+ - read USER data, only when indicated (file is ~/X.XX/startup.blend)
  - free file
  - per Library (per Main)
        - read file
@@@ -4133,7 -4133,6 +4133,7 @@@ static void lib_link_scene(FileData *fd
        Base *base, *next;
        Sequence *seq;
        SceneRenderLayer *srl;
 +      FreestyleLineSet *fls;
        TimeMarker *marker;
        
        sce= main->scene.first;
                        for(srl= sce->r.layers.first; srl; srl= srl->next) {
                                srl->mat_override= newlibadr_us(fd, sce->id.lib, srl->mat_override);
                                srl->light_override= newlibadr_us(fd, sce->id.lib, srl->light_override);
 +                              for(fls=srl->freestyleConfig.linesets.first; fls; fls= fls->next) {
 +                                      fls->linestyle= newlibadr_us(fd, sce->id.lib, fls->linestyle);
 +                              }
                        }
                        /*Game Settings: Dome Warp Text*/
                        sce->gm.dome.warptext= newlibadr(fd, sce->id.lib, sce->gm.dome.warptext);
@@@ -4257,7 -4253,6 +4257,7 @@@ static void direct_link_scene(FileData 
        Editing *ed;
        Sequence *seq;
        MetaStack *ms;
 +      SceneRenderLayer *srl;
  
        sce->theDag = NULL;
        sce->dagisvalid = 0;
        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));
 +      }
 +      for(srl= sce->r.layers.first; srl; srl= srl->next) {
 +              link_list(fd, &(srl->freestyleConfig.linesets));
 +      }
 +      
        sce->nodetree= newdataadr(fd, sce->nodetree);
        if(sce->nodetree)
                direct_link_nodetree(fd, sce->nodetree);
@@@ -5375,14 -5363,6 +5375,14 @@@ static void lib_link_group(FileData *fd
        }
  }
  
 +/* ************ READ LINE STYLE ***************** */
 +
 +static void direct_link_linestyle(FileData *fd, FreestyleLineStyle *linestyle)
 +{
 +
 +}
 +
 +
  /* ************** GENERAL & MAIN ******************** */
  
  
@@@ -5416,7 -5396,6 +5416,7 @@@ static char *dataname(short id_code
                case ID_BR: return "Data from BR";
                case ID_PA: return "Data from PA";
                case ID_GD: return "Data from GD";
 +              case ID_LS: return "Data from LS";
        }
        return "Data from Lib Block";
        
@@@ -5583,9 -5562,6 +5583,9 @@@ static BHead *read_libblock(FileData *f
                case ID_GD:
                        direct_link_gpencil(fd, (bGPdata *)id);
                        break;
 +              case ID_LS:
 +                      direct_link_linestyle(fd, (FreestyleLineStyle *)id);
 +                      break;
        }
        
        /*link direct data of ID properties*/
@@@ -11044,7 -11020,7 +11044,7 @@@ static void do_versions(FileData *fd, L
                                brush->rate = 0.1f;
  
                        /* New Settings */
-                       if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 6)) {
+                       if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 5)) {
                                brush->flag |= BRUSH_SPACE_ATTEN; // explicitly enable adaptive space
  
                                // spacing was originally in pixels, convert it to percentage for new version
@@@ -12031,11 -12007,6 +12031,11 @@@ static void expand_sound(FileData *fd, 
        expand_doit(fd, mainvar, snd->ipo); // XXX depreceated - old animation system
  }
  
 +static void expand_linestyle(FileData *fd, Main *mainvar, FreestyleLineStyle *linestyle)
 +{
 +
 +}
 +
  
  static void expand_main(FileData *fd, Main *mainvar)
  {
                                                break;
                                        case ID_PA:
                                                expand_particlesettings(fd, mainvar, (ParticleSettings *)id);
 +                                              break;
 +                                      case ID_LS:
 +                                              expand_linestyle(fd, mainvar, (FreestyleLineStyle *)id);
 +                                              break;
                                        }
  
                                        doit= 1;
index f873dca4011da08390e768602c7c3d2763741d6a,902f572b2f3cd6ebaa2453d111526c8a0f9f02a0..27832243ceba2f52d7c865a9f4983323657fb38f
@@@ -65,7 -65,7 +65,7 @@@ Any case: direct data is ALWAYS after t
  - write TEST (128x128, blend file preview, optional)
  - write FileGlobal (some global vars)
  - write SDNA
- - write USER if filename is ~/.B.blend
+ - write USER if filename is ~/X.XX/config/startup.blend
  */
  
  
@@@ -1786,8 -1786,6 +1786,8 @@@ static void write_scenes(WriteData *wd
        TimeMarker *marker;
        TransformOrientation *ts;
        SceneRenderLayer *srl;
 +      FreestyleModuleConfig *fmc;
 +      FreestyleLineSet *fls;
        ToolSettings *tos;
        
        sce= scebase->first;
                for(ts = sce->transform_spaces.first; ts; ts = ts->next)
                        writestruct(wd, DATA, "TransformOrientation", 1, ts);
                
 -              for(srl= sce->r.layers.first; srl; srl= srl->next)
 +              for(srl= sce->r.layers.first; srl; srl= srl->next) {
                        writestruct(wd, DATA, "SceneRenderLayer", 1, srl);
 +                      
 +                      for(fmc= srl->freestyleConfig.modules.first; fmc; fmc = fmc->next) {
 +                              writestruct(wd, DATA, "FreestyleModuleConfig", 1, fmc);
 +                      }
 +                      
 +                      for(fls= srl->freestyleConfig.linesets.first; fls; fls = fls->next) {
 +                              writestruct(wd, DATA, "FreestyleLineSet", 1, fls);
 +                              writestruct(wd, DATA, "FreestyleLineStyle", 1, fls->linestyle);
 +                      }
 +
 +              }
                
                if(sce->nodetree) {
                        writestruct(wd, DATA, "bNodeTree", 1, sce->nodetree);
@@@ -2374,17 -2361,6 +2374,17 @@@ static void write_scripts(WriteData *wd
        }
  }
  
 +static void write_linestyles(WriteData *wd, ListBase *idbase)
 +{
 +      FreestyleLineStyle *linestyle;
 +      
 +      for(linestyle=idbase->first; linestyle; linestyle= linestyle->id.next) {
 +              if(linestyle->id.us>0 || wd->current) {
 +                      writestruct(wd, ID_LS, "FreestyleLineStyle", 1, linestyle);
 +              }
 +      }
 +}
 +
  /* context is usually defined by WM, two cases where no WM is available:
   * - for forward compatibility, curscreen has to be saved
   * - for undofile, curscene needs to be saved */
@@@ -2474,7 -2450,6 +2474,7 @@@ static int write_file_handle(Main *main
        write_brushes  (wd, &mainvar->brush);
        write_scripts  (wd, &mainvar->script);
        write_gpencils (wd, &mainvar->gpencil);
 +      write_linestyles(wd, &mainvar->linestyle);
        write_libraries(wd,  mainvar->next);
  
        if (write_user_block) {
@@@ -2506,7 -2481,7 +2506,7 @@@ int BLO_write_file(Main *mainvar, char 
  
        file = open(tempname,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
        if(file == -1) {
-               BKE_reportf(reports, RPT_ERROR, "Can't open file for writing: %s.", strerror(errno));
+               BKE_reportf(reports, RPT_ERROR, "Can't open file %s for writing: %s.", tempname, strerror(errno));
                return 0;
        }
  
index f8e94b87ea951fed9f0162cb222cfb8d27e93eb2,ecbdab982578714930d612d9dabd29844c44fa03..d2b8b5018adff61fbb67fc4f7aeca1ce913a668a
@@@ -121,8 -121,6 +121,8 @@@ void uiTemplateDopeSheetFilter(uiLayou
                uiItemR(row, ptr, "display_armature", 0, "", 0);
        if (mainptr && mainptr->particle.first)
                uiItemR(row, ptr, "display_particle", 0, "", 0);
 +      if (mainptr && mainptr->linestyle.first)
 +              uiItemR(row, ptr, "display_linestyle", 0, "", 0);
        
        /* group-based filtering (only when groups are available */
        if (mainptr && mainptr->group.first) {
@@@ -199,7 -197,7 +199,7 @@@ static void id_search_cb(const bContex
  
                                        if (RNA_function_call(C, &reports, &ptr, func, &parms) == 0) {
                                                int* ret;
-                                               RNA_parameter_get_lookup(&parms, "ret", &ret);
+                                               RNA_parameter_get_lookup(&parms, "ret", (void **)&ret);
  
                                                if (!(*ret)) {
                                                        RNA_parameter_list_free(&parms);
@@@ -2051,7 -2049,7 +2051,7 @@@ void uiTemplateTriColorSet(uiLayout *la
        csPtr= RNA_property_pointer_get(ptr, prop);
        
        uiItemR(row, &csPtr, "normal", 0, "", 0);
-       uiItemR(row, &csPtr, "selected", 0, "", 0);
+       uiItemR(row, &csPtr, "select", 0, "", 0);
        uiItemR(row, &csPtr, "active", 0, "", 0);
  }
  
@@@ -2228,7 -2226,7 +2228,7 @@@ static void list_item_row(bContext *C, 
                uiBlockSetEmboss(block, UI_EMBOSS);
                uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, ptr, "use_textures", i, 0, 0, 0, 0,  NULL);
        }
 -      else if(RNA_struct_is_a(itemptr->type, &RNA_SceneRenderLayer)) {
 +      else if(RNA_struct_is_a(itemptr->type, &RNA_SceneRenderLayer) || itemptr->type == &RNA_FreestyleLineSet) {
                uiItemL(sub, name, icon);
                uiBlockSetEmboss(block, UI_EMBOSS);
                uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "enabled", 0, 0, 0, 0, 0,  NULL);
index 60cd768de12a84373cdd63222972308b3f1364df,3cdc2437c45faf69cbf870303af394dd22fc0e09..fc85d2a80bb386e34ea1c75d3031e00698f3369f
@@@ -4470,6 -4470,11 +4470,6 @@@ static void outliner_draw_iconrow(bCont
        int active;
  
        for(te= lb->first; te; te= te->next) {
 -              
 -              /* exit drawing early */
 -              if((*offsx) - OL_X > xmax)
 -                      break;
 -
                tselem= TREESTORE(te);
                
                /* object hierarchy always, further constrained on level */
@@@ -5110,17 -5115,17 +5110,17 @@@ static void outliner_draw_restrictbuts(
                                uiBlockSetEmboss(block, UI_EMBOSSN);
                                bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_VIEW_OFF,
                                                          (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1,
-                                                         &ptr, "restrict_view", -1, 0, 0, -1, -1, NULL);
+                                                         &ptr, "hide", -1, 0, 0, -1, -1, NULL);
                                uiButSetFunc(bt, restrictbutton_view_cb, scene, ob);
                                
                                bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_SELECT_OFF,
                                                                  (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1,
-                                                                 &ptr, "restrict_select", -1, 0, 0, -1, -1, NULL);
+                                                                 &ptr, "hide_select", -1, 0, 0, -1, -1, NULL);
                                uiButSetFunc(bt, restrictbutton_sel_cb, scene, ob);
                                
                                bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_RENDER_OFF,
                                                                  (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1,
-                                                                 &ptr, "restrict_render", -1, 0, 0, -1, -1, NULL);
+                                                                 &ptr, "hide_render", -1, 0, 0, -1, -1, NULL);
                                uiButSetFunc(bt, restrictbutton_rend_cb, scene, ob);
                                
                                uiBlockSetEmboss(block, UI_EMBOSS);
index 9e667a4b7b2e76c57090a74860a2b5b3df04406b,04fdedd8c8fa62dca424b615c801ce8c15ef2ebe..7e4043c75ca18cc6a7b02307ac1c237a1b3b7a99
@@@ -47,7 -47,6 +47,7 @@@ reload(rna_info
  # lame, python wont give some access
  MethodDescriptorType = type(dict.get)
  GetSetDescriptorType = type(int.real)
 +StaticMethodType = type(staticmethod(lambda: None))
  
  EXAMPLE_SET = set()
  EXAMPLE_SET_USED = set()
@@@ -276,12 -275,6 +276,12 @@@ def pymodule2sphinx(BASEPATH, module_na
              if type(descr) == GetSetDescriptorType:
                  py_descr2sphinx("   ", fw, descr, module_name, type_name, key)
  
 +        for key, descr in descr_items:
 +            if type(descr) == StaticMethodType:
 +                descr = getattr(value, key)
 +                write_indented_lines("   ", fw, descr.__doc__ or "Undocumented", False)
 +                fw("\n")
 +
          fw("\n\n")
  
      file.close()
@@@ -381,7 -374,6 +381,7 @@@ def rna2sphinx(BASEPATH)
  
  
      fw("   mathutils.rst\n\n")
 +    fw("   Freestyle.rst\n\n")
      fw("   blf.rst\n\n")
      
      # game engine
      pymodule2sphinx(BASEPATH, "mathutils", module, "Math Types & Utilities (mathutils)")
      del module
  
 +    import Freestyle as module
 +    pymodule2sphinx(BASEPATH, "Freestyle", module, "Freestyle Operators & Rules (Freestyle)")
 +    del module
 +
      import blf as module
      pymodule2sphinx(BASEPATH, "blf", module, "Font Drawing (blf)")
      del module
          fw("   %s\n\n" % struct.description)
          
          # properties sorted in alphabetical order
-         zip_props_ids = zip(struct.properties, [prop.identifier for prop in struct.properties])
-         zip_props_ids = sorted(zip_props_ids, key=lambda p: p[1])
-         sorted_struct_properties = [x[0] for x in zip_props_ids]
-         
+         sorted_struct_properties = struct.properties[:]
+         sorted_struct_properties.sort(key=lambda prop: prop.identifier)
          for prop in sorted_struct_properties:
              type_descr = prop.get_type_description(class_fmt=":class:`%s`")
              # readonly properties use "data" directive, variables properties use "attribute" directive
index 4763f55593776ba93453e01ee43be86e080c0dfa,15be6174f29fc5ec40f1489528dccd56f2ddc0e5..4b54f5c6416a9bdd00cfbf1f979f0e50207c63a1
  #include "../generic/blf_api.h"
  #include "../generic/IDProp.h"
  
- static char bpy_home_paths_doc[] =
- ".. function:: home_paths(subfolder)\n"
 +#include "BPy_Freestyle.h"
 +
+ static char bpy_script_paths_doc[] =
+ ".. function:: script_paths()\n"
  "\n"
- "   Return 3 paths to blender home directories.\n"
+ "   Return 2 paths to blender scripts directories.\n"
  "\n"
- "   :arg subfolder: The name of a subfolder to find within the blenders home directory.\n"
- "   :type subfolder: string\n"
- "   :return: (system, local, user) strings will be empty when not found.\n"
+ "   :return: (system, user) strings will be empty when not found.\n"
  "   :rtype: tuple of strigs\n";
  
- PyObject *bpy_home_paths(PyObject *self, PyObject *args)
+ PyObject *bpy_script_paths(PyObject *self)
  {
-       PyObject *ret= PyTuple_New(3);
+       PyObject *ret= PyTuple_New(2);
        char *path;
-       char *subfolder= "";
      
-       if (!PyArg_ParseTuple(args, "|s:blender_homes", &subfolder))
-               return NULL;
-       path= BLI_gethome_folder(subfolder, BLI_GETHOME_SYSTEM);
+       path= BLI_get_folder(BLENDER_USER_SCRIPTS, NULL);
        PyTuple_SET_ITEM(ret, 0, PyUnicode_FromString(path?path:""));
-       path= BLI_gethome_folder(subfolder, BLI_GETHOME_LOCAL);
+       path= BLI_get_folder(BLENDER_SYSTEM_SCRIPTS, NULL);
        PyTuple_SET_ITEM(ret, 1, PyUnicode_FromString(path?path:""));
-       path= BLI_gethome_folder(subfolder, BLI_GETHOME_USER);
-       PyTuple_SET_ITEM(ret, 2, PyUnicode_FromString(path?path:""));
      
        return ret;
  }
@@@ -122,7 -110,7 +112,7 @@@ static PyObject *bpy_blend_paths(PyObje
        return list;
  }
  
- static PyMethodDef meth_bpy_home_paths[] = {{ "home_paths", (PyCFunction)bpy_home_paths, METH_VARARGS, bpy_home_paths_doc}};
+ static PyMethodDef meth_bpy_script_paths[] = {{ "script_paths", (PyCFunction)bpy_script_paths, METH_NOARGS, bpy_script_paths_doc}};
  static PyMethodDef meth_bpy_blend_paths[] = {{ "blend_paths", (PyCFunction)bpy_blend_paths, METH_VARARGS|METH_KEYWORDS, bpy_blend_paths_doc}};
  
  static void bpy_import_test(char *modname)
@@@ -164,7 -152,6 +154,7 @@@ void BPy_init_modules( void 
        BGL_Init();
        BLF_Init();
        IDProp_Init_Types();
 +      Freestyle_Init();
  
  
        mod = PyModule_New("_bpy");
        PyModule_AddObject(mod, "context", (PyObject *)bpy_context_module);
  
        /* utility func's that have nowhere else to go */
-       PyModule_AddObject(mod, meth_bpy_home_paths->ml_name, (PyObject *)PyCFunction_New(meth_bpy_home_paths, NULL));
+       PyModule_AddObject(mod, meth_bpy_script_paths->ml_name, (PyObject *)PyCFunction_New(meth_bpy_script_paths, NULL));
        PyModule_AddObject(mod, meth_bpy_blend_paths->ml_name, (PyObject *)PyCFunction_New(meth_bpy_blend_paths, NULL));
  
        /* add our own modules dir, this is a python package */
index fe524b6cfcc673446dc9dbce55b596f53da8c7ca,812c001a2bb168c4b68c2f48cce0dfffa5cf8e93..798f98cf78c257f1ca974f4fb395fb5cea7ca11a
@@@ -39,7 -39,6 +39,7 @@@ INCLUDE_DIRECTORIES
        ../blender/render/extern/include
        ../blender/makesdna
        ../blender/gpu
 +      ../blender/freestyle
        ../blender/windowmanager
        ../kernel/gen_messaging
        ../kernel/gen_system
@@@ -193,9 -192,35 +193,35 @@@ IF(WITH_INSTALL
                ENDIF(WITH_GAMEENGINE AND WITH_PLAYER)
  
                INSTALL(
-                       DIRECTORY ${TARGETDIR}/.blender/
-                       DESTINATION ${BLENDERPATH}
-               )
+             FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
+             DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
+         )
+               INSTALL(
+             FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/blender.svg
+             DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps
+         )
+               INSTALL(
+             FILES ${CMAKE_SOURCE_DIR}/doc/blender.1
+             DESTINATION ${CMAKE_INSTALL_PREFIX}/man
+         )
+               INSTALL(
+             DIRECTORY ${CMAKE_SOURCE_DIR}/release/text/
+             DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/blender
+             PATTERN ".svn" EXCLUDE
+         )
+               INSTALL(
+             DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts/
+             DESTINATION ${BLENDERPATH}/scripts
+             PATTERN ".svn" EXCLUDE
+         )
+               IF(WITH_INTERNATIONAL)
+                       INSTALL(
+               DIRECTORY ${CMAKE_SOURCE_DIR}/bin/.blender/locale/
+               DESTINATION ${BLENDERPATH}/datafiles/locale
+               PATTERN ".svn" EXCLUDE
+               )
+               ENDIF(WITH_INTERNATIONAL)
+         
                # end "make install"
      
        ENDIF(UNIX AND NOT APPLE)
@@@ -393,7 -418,6 +419,7 @@@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux"
          bf_editor_animation
          bf_editor_datafiles
  
 +              bf_freestyle
                blender_BSP 
                blender_render 
                blender_ONL 
diff --combined source/creator/creator.c
index 4a502355579316e9a2557d854cc0139f3563d86b,283511ef3ffabfae3890fb49495845122f45eaac..fbe9d100b14236c497fbfabcd5c15ef4d0829af6
@@@ -96,8 -96,6 +96,8 @@@
  #include "GPU_draw.h"
  #include "GPU_extensions.h"
  
 +#include "FRS_freestyle.h"
 +
  /* for passing information between creator and gameengine */
  #include "SYS_System.h"
  
@@@ -133,14 -131,6 +133,6 @@@ extern int pluginapi_force_ref(void);  
  char bprogname[FILE_MAXDIR+FILE_MAXFILE]; /* from blenpluginapi:pluginapi.c */
  char btempdir[FILE_MAXDIR+FILE_MAXFILE];
  
- /* unix path support.
-  * defined by the compiler. eg "/usr/share/blender/2.5" "/opt/blender/2.5" */
- #ifndef BLENDERPATH
- #define BLENDERPATH ""
- #endif
-  
- char blender_path[FILE_MAXDIR+FILE_MAXFILE] = BLENDERPATH;
  /* Initialise callbacks for the modules that need them */
  static void setCallbacks(void); 
  
@@@ -291,20 -281,22 +283,22 @@@ static int print_help(int argc, char **
        printf ("\t\t\"blender --background test.blend --render-output /tmp --render-frame 1\" works as expected.\n\n");
  
        printf ("\nEnvironment Variables:\n");
-       printf ("  $HOME\t\t\tStore files such as .blender/ .B.blend .Bfs .Blog here.\n");
-       printf ("  $BLENDERPATH  System directory to use for data files and scripts.\n");
-       printf ("                For this build of blender the default $BLENDERPATH is...\n");
-       printf ("                \"%s\"\n", blender_path);
-       printf ("                setting the $BLENDERPATH will override this\n");
+       printf ("  $BLENDER_USER_CONFIG      Directory for user configuration files.\n");
+       printf ("  $BLENDER_SYSTEM_CONFIG    Directory for system wide configuration files.\n");
+       printf ("  $BLENDER_USER_SCRIPTS     Directory for user scripts.\n");
+       printf ("  $BLENDER_SYSTEM_SCRIPTS   Directory for system wide scripts.\n");
+       printf ("  $BLENDER_USER_DATAFILES   Directory for user data files (icons, translations, ..).\n");
+       printf ("  $BLENDER_SYSTEM_DATAFILES Directory for system wide data files.\n");
+       printf ("  $BLENDER_SYSTEM_PYTHON    Directory for system python libraries.\n");
  #ifdef WIN32
-       printf ("  $TEMP         Store temporary files here.\n");
+       printf ("  $TEMP                     Store temporary files here.\n");
  #else
-       printf ("  $TMP or $TMPDIR  Store temporary files here.\n");
+       printf ("  $TMP or $TMPDIR           Store temporary files here.\n");
  #endif
  #ifndef DISABLE_SDL
-       printf ("  $SDL_AUDIODRIVER  LibSDL audio driver - alsa, esd, alsa, dma.\n");
+       printf ("  $SDL_AUDIODRIVER          LibSDL audio driver - alsa, esd, dma.\n");
  #endif
-       printf ("  $PYTHONHOME   Path to the python directory, eg. /usr/lib/python.\n\n");
+       printf ("  $PYTHONHOME               Path to the python directory, eg. /usr/lib/python.\n\n");
  
        exit(0);
  
@@@ -1040,12 -1032,6 +1034,6 @@@ int main(int argc, char **argv
  
        BLI_where_am_i(bprogname, argv[0]);
        
-       {       /* override the hard coded blender path */
-               char *blender_path_env = getenv("BLENDERPATH");
-               if(blender_path_env)
-                       BLI_strncpy(blender_path, blender_path_env, sizeof(blender_path));
-       }
  #ifdef BUILD_DATE     
      strip_quotes(build_date);
      strip_quotes(build_time);
                WM_init(C, argc, argv);
                
                /* this is properly initialized with user defs, but this is default */
-               BLI_where_is_temp( btempdir, 1 ); /* call after loading the .B.blend so we can read U.tempdir */
+               BLI_where_is_temp( btempdir, 1 ); /* call after loading the startup.blend so we can read U.tempdir */
  
  #ifndef DISABLE_SDL
        BLI_setenv("SDL_VIDEODRIVER", "dummy");
  
                WM_init(C, argc, argv);
  
-               BLI_where_is_temp( btempdir, 0 ); /* call after loading the .B.blend so we can read U.tempdir */
+               BLI_where_is_temp( btempdir, 0 ); /* call after loading the startup.blend so we can read U.tempdir */
        }
  #ifndef DISABLE_PYTHON
        /**
        CTX_py_init_set(C, 1);
        WM_keymap_init(C);
  
 +      /* initialize Freestyle */
 +      FRS_initialize();
 +      FRS_set_context(C);
 +
        /* OK we are ready for it */
        BLI_argsParse(ba, 4, load_file, C);