Merged changes in the trunk up to revision 34193.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 9 Jan 2011 15:07:14 +0000 (15:07 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 9 Jan 2011 15:07:14 +0000 (15:07 +0000)
Conflicts resolved:
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/space_nla/nla_channels.c
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_scene.c

API changes resolved:
source/blender/freestyle/intern/system/PythonInterpreter.h

44 files changed:
1  2 
release/scripts/ui/space_dopesheet.py
release/scripts/ui/space_userpref.py
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/scene.c
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/bpath.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/interface/interface_templates.c
source/blender/editors/render/render_shading.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_orientations.c
source/blender/freestyle/intern/system/PythonInterpreter.h
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/python/intern/bpy.c
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/shadeoutput.c
source/creator/CMakeLists.txt
source/creator/creator.c

Simple merge
Simple merge
index fcaf44e296185c7ee00e24c4b65d6ea0f5cbf306,94eed530ad6d162036dafd4d6458fd68ce840f4a..fe6d834cb70b53f3f3cac5e4fe759b031be88010
  //XXX #include "BIF_previewrender.h"
  //XXX #include "BIF_editseq.h"
  
- #include "BLI_math.h"
- #include "BLI_blenlib.h"
 +#include "FRS_freestyle_config.h"
 +
  //XXX #include "nla.h"
  
  #ifdef WIN32
Simple merge
Simple merge
index 592149157aa227e9e667a575bbea512981666717,298fd9102ec760ad769fba2d707bc40f086fe04c..cc1e8bd9eb89cecceaed2e57bcf90363ce68b520
@@@ -42,7 -43,7 +43,8 @@@
  #include "DNA_space_types.h"
  #include "DNA_key_types.h"
  #include "DNA_lamp_types.h"
+ #include "DNA_lattice_types.h"
 +#include "DNA_linestyle_types.h"
  #include "DNA_mesh_types.h"
  #include "DNA_material_types.h"
  #include "DNA_meta_types.h"
@@@ -2567,7 -2570,7 +2647,8 @@@ void ANIM_init_channel_typeinfo_data (v
                animchannelTypeInfo[type++]= &ACF_DSARM;                /* Armature Channel */
                animchannelTypeInfo[type++]= &ACF_DSMESH;               /* Mesh Channel */
                animchannelTypeInfo[type++]= &ACF_DSTEX;                /* Texture Channel */
+               animchannelTypeInfo[type++]= &ACF_DSLAT;                /* Lattice Channel */
 +              animchannelTypeInfo[type++]= &ACF_DSLINESTYLE;  /* LineStyle Channel */
                
                animchannelTypeInfo[type++]= &ACF_SHAPEKEY;             /* ShapeKey */
                
index 9d6b6d80a78ec78f0406056b5dd0d177095c0a9a,319f80404b4b386c312171d9e81e06454a4a5ffa..f4e3602343f2240b47113cb1f3cbf1fd9ade3a17
@@@ -234,7 -239,7 +239,8 @@@ void ANIM_deselect_anim_channels (bAnim
                                case ANIMTYPE_DSMESH:
                                case ANIMTYPE_DSNTREE:
                                case ANIMTYPE_DSTEX:
+                               case ANIMTYPE_DSLAT:
 +                              case ANIMTYPE_DSLINESTYLE:
                                {
                                        if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED))
                                                sel= ACHANNEL_SETFLAG_CLEAR;
                        case ANIMTYPE_DSMESH:
                        case ANIMTYPE_DSNTREE:
                        case ANIMTYPE_DSTEX:
+                       case ANIMTYPE_DSLAT:
 +                      case ANIMTYPE_DSLINESTYLE:
                        {
                                /* need to verify that this data is valid for now */
                                if (ale->adt) {
@@@ -1940,7 -1945,7 +1947,8 @@@ static int mouse_anim_channels (bAnimCo
                case ANIMTYPE_DSMESH:
                case ANIMTYPE_DSNTREE:
                case ANIMTYPE_DSTEX:
+               case ANIMTYPE_DSLAT:
 +              case ANIMTYPE_DSLINESTYLE:
                {
                        /* sanity checking... */
                        if (ale->adt) {
index 548d06993e7b40431aa641d66c12145faf668fb1,5e7e071954c52710d3f905c041a8cd632525eac1..93808233288ddc69a5f037dfafc3fb39f8566a8d
@@@ -47,7 -48,7 +48,8 @@@
  #include "DNA_scene_types.h"
  #include "DNA_key_types.h"
  #include "DNA_lamp_types.h"
+ #include "DNA_lattice_types.h"
 +#include "DNA_linestyle_types.h"
  #include "DNA_mesh_types.h"
  #include "DNA_material_types.h"
  #include "DNA_meta_types.h"
@@@ -830,6 -816,14 +834,14 @@@ void ob_to_keylist(bDopeSheet *ads, Obj
                                action_to_keylist(me->adt, me->adt->action, keys, blocks);
                }
                        break;
 -              }
+               case OB_LATTICE: /* ------- Lattice ---------- */
+               {
+                       Lattice *lt= (Lattice *)ob->data;
+                       
+                       if ((lt->adt) && !(filterflag & ADS_FILTER_NOLAT)) 
+                               action_to_keylist(lt->adt, lt->adt->action, keys, blocks);
++      }
+                       break;
        }
        
        /* Add Particle System Keyframes */
index a1c02f922f29c152ff2db9a9902246110dc347ba,0a21dfcb43ff5839ef31d72881f81374c26890a1..ca056b61efaecb12d713ded23593d7ae2c096c32
@@@ -39,7 -40,7 +40,8 @@@
  #include "DNA_camera_types.h"
  #include "DNA_key_types.h"
  #include "DNA_lamp_types.h"
+ #include "DNA_lattice_types.h"
 +#include "DNA_linestyle_types.h"
  #include "DNA_mesh_types.h"
  #include "DNA_material_types.h"
  #include "DNA_object_types.h"
@@@ -319,6 -320,16 +321,16 @@@ static short ob_keyframes_loop(Keyframe
                        }
                }
                        break;
 -                      }
+               case OB_LATTICE: /* ---- Lattice ------ */
+               {
+                       Lattice *lt= (Lattice *)ob->data;
+                       
+                       if ((lt->adt) && !(filterflag & ADS_FILTER_NOLAT)) {
+                               if (adt_keyframes_loop(ked, lt->adt, key_ok, key_cb, fcu_cb, filterflag))
+                                       return 1;
++      }
+               }
+                       break;
        }
        
        /* Add Particle System Keyframes */
index 4679d36e400d37fe5e9164112c04e9241d90b878,22e85857251803965b971bfe6e4c9ae0f56f596d..997250b7a2ab70bc9fc03b185ed8588b10498844
@@@ -153,7 -153,7 +153,8 @@@ typedef enum eAnim_ChannelType 
        ANIMTYPE_DSARM,
        ANIMTYPE_DSMESH,
        ANIMTYPE_DSTEX,
+       ANIMTYPE_DSLAT,
 +      ANIMTYPE_DSLINESTYLE,
        
        ANIMTYPE_SHAPEKEY,
        
index 289c1a5d0286ba4c2963b950c8648eea1b9b552c,44fce4819f319394239ac1e299a502041cca2274..bdb38557ae2067e92504ab76359931e5e0bbee25
  #include "IMB_imbuf.h"
  #include "IMB_imbuf_types.h"
  
- #include "BLI_blenlib.h"
- #include "BLI_math.h"
- #include "BLI_editVert.h"
- #include "BLI_listbase.h"
  #include "GPU_material.h"
  
 +#include "FRS_freestyle.h"
 +
  #include "RNA_access.h"
 +#include "RNA_enum_types.h"
  
  #include "WM_api.h"
  #include "WM_types.h"
index cdc51215d853831f38f96c5874eb7afc65bc11e8,2a03f00e7872ed69089404310accfc3e84f68f0d..8f6f5082877eed6d618d9c069bfc1f1da57eac7c
@@@ -173,7 -173,7 +173,8 @@@ static int mouse_nla_channels (bAnimCon
                case ANIMTYPE_DSARM:
                case ANIMTYPE_DSMESH:
                case ANIMTYPE_DSTEX:
+               case ANIMTYPE_DSLAT:
 +              case ANIMTYPE_DSLINESTYLE:
                {
                        /* sanity checking... */
                        if (ale->adt) {
index 934755b823195aaa8516321f9e787d66a202836b,0000000000000000000000000000000000000000..379e9a0fdef2ee53a7b3f60c984f480d663c4c33
mode 100755,000000..100755
--- /dev/null
@@@ -1,180 -1,0 +1,180 @@@
-       int status = BPY_run_python_script(_context, fn, NULL, reports);
 +//
 +//  Filename         : PythonInterpreter.h
 +//  Author(s)        : Emmanuel Turquin
 +//  Purpose          : Python Interpreter
 +//  Date of creation : 17/04/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  PYTHON_INTERPRETER_H
 +# define PYTHON_INTERPRETER_H
 +
 +# include <Python.h>
 +# include <iostream>
 +# include "StringUtils.h"
 +# include "Interpreter.h"
 +
 +//soc
 +extern "C" {
 +#include "MEM_guardedalloc.h"
 +#include "DNA_text_types.h"
 +#include "BKE_main.h"
 +#include "BKE_context.h"
 +#include "BKE_global.h"
 +#include "BKE_report.h"
 +#include "BKE_text.h"
 +#include "BKE_library.h"
 +#include "BPY_extern.h"
 +}
 +
 +class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter
 +{
 + public:
 +
 +  PythonInterpreter() {
 +    _language = "Python";
 +      _context = 0;
 +    //Py_Initialize();
 +  }
 +
 +  virtual ~PythonInterpreter() {
 +    //Py_Finalize();
 +  }
 +
 +  void setContext(bContext *C) {
 +      _context = C;
 +  }
 +
 +  int interpretFile(const string& filename) {
 +
 +      initPath();
 +      
 +      ReportList* reports = CTX_wm_reports(_context);
 +      BKE_reports_clear(reports);
 +      char *fn = const_cast<char*>(filename.c_str());
 +#if 0
-               status = BPY_run_python_script(_context, NULL, text, reports);
++      int status = BPY_filepath_exec(_context, fn, reports);
 +#else
 +      int status;
 +      Text *text = add_text(fn, G.main->name);
 +      if (text) {
-       if (!BPY_run_python_script(_context, NULL, text, reports)) {
++              status = BPY_text_exec(_context, text, reports);
 +              unlink_text(G.main, text);
 +              free_libblock(&G.main->text, text);
 +      } else {
 +              BKE_reportf(reports, RPT_ERROR, "Cannot open file: %s", fn);
 +              status = 0;
 +      }
 +#endif
 +
 +      if (status != 1) {
 +              cout << "\nError executing Python script from PythonInterpreter::interpretFile" << endl;
 +              cout << "File: " << fn << endl;
 +              cout << "Errors: " << endl;
 +              BKE_reports_print(reports, RPT_ERROR);
 +              return 1;
 +      }
 +
 +      // cleaning up
 +      BKE_reports_clear(reports);
 +      
 +      return 0;
 +  }
 +
 +  int interpretText(struct Text *text, const string& name) {
 +
 +      initPath();
 +
 +      ReportList* reports = CTX_wm_reports(_context);
 +
 +      BKE_reports_clear(reports);
 +
-       BPY_run_python_script(_context, NULL, text, NULL);
++      if (!BPY_text_exec(_context, text, reports)) {
 +              cout << "\nError executing Python script from PythonInterpreter::interpretText" << endl;
 +              cout << "Name: " << name << endl;
 +              cout << "Errors: " << endl;
 +              BKE_reports_print(reports, RPT_ERROR);
 +              return 1;
 +      }
 +
 +      BKE_reports_clear(reports);
 +
 +      return 0;
 +  }
 +
 +  struct Options
 +  {
 +    static void setPythonPath(const string& path) {
 +      _path = path;
 +    }
 +
 +    static string getPythonPath() {
 +      return _path;
 +    }
 +  };
 +
 +  void reset() {
 +    Py_Finalize();
 +    Py_Initialize();
 +    _initialized = false;
 +  }
 +
 +private:
 +
 +  bContext* _context;
 +
 +  void initPath() {
 +      if (_initialized)
 +              return;
 +
 +      vector<string> pathnames;
 +      StringUtils::getPathName(_path, "", pathnames);
 +      
 +      struct Text *text = add_empty_text("tmp_freestyle_initpath.txt");
 +      string cmd = "import sys\n";
 +      txt_insert_buf(text, const_cast<char*>(cmd.c_str()));
 +      
 +      for (vector<string>::const_iterator it = pathnames.begin(); it != pathnames.end();++it) {
 +              if ( !it->empty() ) {
 +                      cout << "Adding Python path: " << *it << endl;
 +                      cmd = "sys.path.append(r\"" + *it + "\")\n";
 +                      txt_insert_buf(text, const_cast<char*>(cmd.c_str()));
 +              }
 +      }
 +      
++      BPY_text_exec(_context, text, NULL);
 +      
 +      // cleaning up
 +      unlink_text(G.main, text);
 +      free_libblock(&G.main->text, text);
 +      
 +      //PyRun_SimpleString("from Freestyle import *");
 +    _initialized = true;
 +  }
 +
 +  static bool _initialized;
 +  static string _path;
 +};
 +
 +#endif // PYTHON_INTERPRETER_H
Simple merge
Simple merge
index 6e31f874283edf62299565d1343cd91d469eb5e8,3a6496fab60f108e49affe90e8343bed3966f8ef..94e924f203ed185567816bd2a011bb06e8e5eb7d
@@@ -137,12 -124,27 +124,28 @@@ if(WITH_JACK
        add_definitions(-DWITH_JACK)
  endif()
  
- if(WITH_OPENCOLLADA)
-       add_definitions(-DWITH_COLLADA)
- endif()
  # Build makesrna executable
- add_executable(makesrna ${SRC} ${INC_FILES})
+ blender_include_dirs(
+       .
+       ..
+       ../../blenkernel
+       ../../blenlib
+       ../../blenfont
+       ../../gpu
+       ../../imbuf
+       ../../ikplugin
+       ../../makesdna
+       ../../windowmanager
+       ../../editors/include
+       ../../render/extern/include
++      ../../freestyle
+       ../../../../extern/glew/include
+       ../../../../intern/audaspace/intern
+       ../../../../intern/guardedalloc
+       ../../../../intern/memutil
+ )
+ add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC})
  target_link_libraries(makesrna bf_dna)
  
  # Output rna_*_gen.c
index 2a2e4de90328428441fd0870b5231190d7d18b7a,3ab7d05cd8a7cd98aa0660850617697175025de6..91220852e6deae97d830246491ccccfd895cd0db
@@@ -474,22 -473,35 +474,52 @@@ void rna_Main_particles_remove(Main *bm
        /* XXX python now has invalid pointer? */
  }
  
 +FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char* name)
 +{
 +      FreestyleLineStyle *linestyle = FRS_new_linestyle(name, bmain);
 +      linestyle->id.us--;
 +      return linestyle;
 +}
 +void rna_Main_linestyles_remove(Main *bmain, ReportList *reports, FreestyleLineStyle *linestyle)
 +{
 +      if(ID_REAL_USERS(linestyle) <= 0)
 +              free_libblock(&bmain->linestyle, linestyle);
 +      else
 +              BKE_reportf(reports, RPT_ERROR, "Line style \"%s\" must have zero users to be removed, found %d.", linestyle->id.name+2, ID_REAL_USERS(linestyle));
 +
 +      /* XXX python now has invalid pointer? */
 +}
 +
+ /* tag functions, all the same */
+ void rna_Main_cameras_tag(Main *bmain, int value) { tag_main_lb(&bmain->camera, value); }
+ void rna_Main_scenes_tag(Main *bmain, int value) { tag_main_lb(&bmain->scene, value); }
+ void rna_Main_objects_tag(Main *bmain, int value) { tag_main_lb(&bmain->object, value); }
+ void rna_Main_materials_tag(Main *bmain, int value) { tag_main_lb(&bmain->mat, value); }
+ void rna_Main_node_groups_tag(Main *bmain, int value) { tag_main_lb(&bmain->nodetree, value); }
+ void rna_Main_meshes_tag(Main *bmain, int value) { tag_main_lb(&bmain->mesh, value); }
+ void rna_Main_lamps_tag(Main *bmain, int value) { tag_main_lb(&bmain->lamp, value); }
+ void rna_Main_libraries_tag(Main *bmain, int value) { tag_main_lb(&bmain->library, value); }
+ void rna_Main_screens_tag(Main *bmain, int value) { tag_main_lb(&bmain->screen, value); }
+ void rna_Main_window_managers_tag(Main *bmain, int value) { tag_main_lb(&bmain->wm, value); }
+ void rna_Main_images_tag(Main *bmain, int value) { tag_main_lb(&bmain->image, value); }
+ void rna_Main_lattices_tag(Main *bmain, int value) { tag_main_lb(&bmain->latt, value); }
+ void rna_Main_curves_tag(Main *bmain, int value) { tag_main_lb(&bmain->curve, value); }
+ void rna_Main_metaballs_tag(Main *bmain, int value) { tag_main_lb(&bmain->mball, value); }
+ void rna_Main_fonts_tag(Main *bmain, int value) { tag_main_lb(&bmain->vfont, value); }
+ void rna_Main_textures_tag(Main *bmain, int value) { tag_main_lb(&bmain->tex, value); }
+ void rna_Main_brushes_tag(Main *bmain, int value) { tag_main_lb(&bmain->brush, value); }
+ void rna_Main_worlds_tag(Main *bmain, int value) { tag_main_lb(&bmain->world, value); }
+ void rna_Main_groups_tag(Main *bmain, int value) { tag_main_lb(&bmain->group, value); }
+ void rna_Main_shape_keys_tag(Main *bmain, int value) { tag_main_lb(&bmain->key, value); }
+ void rna_Main_scripts_tag(Main *bmain, int value) { tag_main_lb(&bmain->script, value); }
+ void rna_Main_texts_tag(Main *bmain, int value) { tag_main_lb(&bmain->text, value); }
+ void rna_Main_sounds_tag(Main *bmain, int value) { tag_main_lb(&bmain->sound, value); }
+ void rna_Main_armatures_tag(Main *bmain, int value) { tag_main_lb(&bmain->armature, value); }
+ void rna_Main_actions_tag(Main *bmain, int value) { tag_main_lb(&bmain->action, value); }
+ void rna_Main_particles_tag(Main *bmain, int value) { tag_main_lb(&bmain->particle, value); }
+ void rna_Main_gpencil_tag(Main *bmain, int value) { tag_main_lb(&bmain->gpencil, value); }
++void rna_Main_linestyle_tag(Main *bmain, int value) { tag_main_lb(&bmain->linestyle, value); }
  #else
  
  void RNA_api_main(StructRNA *srna)
@@@ -693,18 -725,55 +743,55 @@@ void RNA_def_main_lamps(BlenderRNA *brn
        RNA_def_function_ui_description(func, "Remove a lamp from the current blendfile.");
        parm= RNA_def_pointer(func, "lamp", "Lamp", "", "Lamp to remove.");
        RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+       func= RNA_def_function(srna, "tag", "rna_Main_lamps_tag");
+       parm= RNA_def_boolean(func, "value", 0, "Value", "");
+       RNA_def_property_flag(parm, PROP_REQUIRED);
  }
  void RNA_def_main_libraries(BlenderRNA *brna, PropertyRNA *cprop)
  {
+       StructRNA *srna;
+       FunctionRNA *func;
+       PropertyRNA *parm;
+       RNA_def_property_srna(cprop, "MainLibraries");
+       srna= RNA_def_struct(brna, "MainLibraries", NULL);
+       RNA_def_struct_ui_text(srna, "Main Libraries", "Collection of libraries");
  
+       func= RNA_def_function(srna, "tag", "rna_Main_libraries_tag");
+       parm= RNA_def_boolean(func, "value", 0, "Value", "");
+       RNA_def_property_flag(parm, PROP_REQUIRED);
  }
  void RNA_def_main_screens(BlenderRNA *brna, PropertyRNA *cprop)
  {
+       StructRNA *srna;
+       FunctionRNA *func;
+       PropertyRNA *parm;
  
+       RNA_def_property_srna(cprop, "MainScreens");
+       srna= RNA_def_struct(brna, "MainScreens", NULL);
+       RNA_def_struct_ui_text(srna, "Main Screens", "Collection of screens");
+       func= RNA_def_function(srna, "tag", "rna_Main_screens_tag");
+       parm= RNA_def_boolean(func, "value", 0, "Value", "");
+       RNA_def_property_flag(parm, PROP_REQUIRED);
  }
  void RNA_def_main_window_managers(BlenderRNA *brna, PropertyRNA *cprop)
  {
 -
+       StructRNA *srna;
+       FunctionRNA *func;
+       PropertyRNA *parm;
 +    
+       RNA_def_property_srna(cprop, "MainWindowManagers");
+       srna= RNA_def_struct(brna, "MainWindowManagers", NULL);
+       RNA_def_struct_ui_text(srna, "Main Window Managers", "Collection of window managers");
+       func= RNA_def_function(srna, "tag", "rna_Main_window_managers_tag");
+       parm= RNA_def_boolean(func, "value", 0, "Value", "");
+       RNA_def_property_flag(parm, PROP_REQUIRED);
  }
  void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop)
  {
@@@ -1052,35 -1183,26 +1201,50 @@@ void RNA_def_main_particles(BlenderRNA 
        RNA_def_function_ui_description(func, "Remove a particle settings instance from the current blendfile.");
        parm= RNA_def_pointer(func, "particle", "ParticleSettings", "", "Particle Settings to remove.");
        RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+       func= RNA_def_function(srna, "tag", "rna_Main_particles_tag");
+       parm= RNA_def_boolean(func, "value", 0, "Value", "");
+       RNA_def_property_flag(parm, PROP_REQUIRED);
  }
  void RNA_def_main_gpencil(BlenderRNA *brna, PropertyRNA *cprop)
  {
+       StructRNA *srna;
+       FunctionRNA *func;
+       PropertyRNA *parm;
  
+       RNA_def_property_srna(cprop, "MainGreasePencils");
+       srna= RNA_def_struct(brna, "MainGreasePencils", NULL);
+       RNA_def_struct_ui_text(srna, "Main Grease Pencils", "Collection of grease pencils");
+       func= RNA_def_function(srna, "tag", "rna_Main_gpencil_tag");
+       parm= RNA_def_boolean(func, "value", 0, "Value", "");
+       RNA_def_property_flag(parm, PROP_REQUIRED);
  }
 +void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop)
 +{
 +      StructRNA *srna;
 +      FunctionRNA *func;
 +      PropertyRNA *parm;
 +
 +      RNA_def_property_srna(cprop, "MainLineStyles");
 +      srna= RNA_def_struct(brna, "MainLineStyles", NULL);
 +      RNA_def_struct_ui_text(srna, "Main Line Styles", "Collection of line styles");
 +
 +      func= RNA_def_function(srna, "new", "rna_Main_linestyles_new");
 +      RNA_def_function_ui_description(func, "Add a new line style instance to the main database");
 +      parm= RNA_def_string(func, "name", "FreestyleLineStyle", 0, "", "New name for the datablock.");
 +      RNA_def_property_flag(parm, PROP_REQUIRED);
 +      /* return type */
 +      parm= RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "New line style datablock.");
 +      RNA_def_function_return(func, parm);
 +
 +      func= RNA_def_function(srna, "remove", "rna_Main_linestyles_remove");
 +      RNA_def_function_flag(func, FUNC_USE_REPORTS);
 +      RNA_def_function_ui_description(func, "Remove a line style instance from the current blendfile.");
 +      parm= RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "Line style to remove.");
 +      RNA_def_property_flag(parm, PROP_REQUIRED);
 +}
  
  #endif
  
index f4f7bda5efaade0e52f9a918fb0bdba4a4d424b2,13a46e088149ab5b17778ae1d58e1b614bd49889..2529d262ddae93aed12b8d869f76d4e1f6bbaf45
@@@ -183,9 -182,7 +183,9 @@@ EnumPropertyItem image_type_items[] = 
  
  #include "RE_pipeline.h"
  
- static PointerRNA rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key)
 +#include "FRS_freestyle.h"
 +
+ static int rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
  {
        Scene *scene= (Scene*)ptr->data;
        Base *base;
@@@ -1178,7 -1138,13 +1184,13 @@@ static void rna_def_tool_settings(Blend
        RNA_def_property_ui_text(prop, "Project Individual Elements", "Project individual elements on the surface of other objects");
        RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
        RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
 -      
 +
+       /* Grease Pencil */
+       prop = RNA_def_property(srna, "use_grease_pencil_sessions", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_PAINTSESSIONS_ON);
+       RNA_def_property_ui_text(prop, "Use Sketching Sessions", "Allow drawing multiple strokes at a time with Grease Pencil");
+       RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); // xxx: need toolbar to be redrawn...
+       
        /* Auto Keying */
        prop= RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
Simple merge
Simple merge
Simple merge