Merged changes in the trunk up to revision 44419.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 25 Feb 2012 01:26:45 +0000 (01:26 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 25 Feb 2012 01:26:45 +0000 (01:26 +0000)
Conflicts resolved:
doc/python_api/sphinx_doc_gen.py
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_view3d/drawobject.c
source/creator/CMakeLists.txt

19 files changed:
1  2 
doc/python_api/sphinx_doc_gen.py
source/blender/blenkernel/CMakeLists.txt
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/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/bmesh.h
source/blender/bmesh/operators/bmo_utils.c
source/blender/editors/mesh/bmesh_select.c
source/blender/editors/mesh/bmesh_tools.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/transform/transform.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_scene.c
source/blender/python/SConscript
source/creator/CMakeLists.txt

index e5a78ecb02c1f55c1fdfcecd56e53ab7571d62bf,9c1dede901970e0806698b3ed1c62bc84bc3937b..79a534a969e8093a2323d8cd61a14184605275c7
@@@ -88,7 -88,9 +88,10 @@@ else
          "mathutils",
          "mathutils.geometry",
          "mathutils.noise",
+         #"bmesh",
+         #"bmesh.types",
+         #"bmesh.utils",
 +        "Freestyle",
      )
  
      FILTER_BPY_TYPES = ("bpy_struct", "Operator", "ID")  # allow
@@@ -1203,8 -1199,7 +1207,9 @@@ def rna2sphinx(BASEPATH)
          fw("   mathutils.geometry.rst\n\n")
      if "mathutils.noise" not in EXCLUDE_MODULES:
          fw("   mathutils.noise.rst\n\n")
+     # misc
 +    if "Freestyle" not in EXCLUDE_MODULES:
 +        fw("   Freestyle.rst\n\n")
      if "bgl" not in EXCLUDE_MODULES:
          fw("   bgl.rst\n\n")
      if "blf" not in EXCLUDE_MODULES:
          import mathutils.noise as module
          pymodule2sphinx(BASEPATH, "mathutils.noise", module, "Noise Utilities")
  
+     if "bmesh" not in EXCLUDE_MODULES:
+         import bmesh as module
+         pymodule2sphinx(BASEPATH, "bmesh", module, "BMesh Module")
+     if "bmesh.types" not in EXCLUDE_MODULES:
+         import bmesh.types as module
+         pymodule2sphinx(BASEPATH, "bmesh.types", module, "BMesh Types")
+     if "bmesh.utils" not in EXCLUDE_MODULES:
+         import bmesh.utils as module
+         pymodule2sphinx(BASEPATH, "bmesh.utils", module, "BMesh Utilities")
 +    if "Freestyle" not in EXCLUDE_MODULES:
 +        import Freestyle as module
 +        pymodule2sphinx(BASEPATH, "Freestyle", module, "Freestyle Data Types & Operators")
 +
      if "blf" not in EXCLUDE_MODULES:
          import blf as module
          pymodule2sphinx(BASEPATH, "blf", module, "Font Drawing")
index 2aa53e2484d4463f5ff20fadc9df0d4783a7349c,e01cd992ad8d51a8bd0053bb9671bad709787edd..e9aea36b1f16226fbc312a5158f6d30b06ca4df8
@@@ -242,10 -240,9 +242,10 @@@ Scene *copy_scene(Scene *sce, int type
  void free_scene(Scene *sce)
  {
        Base *base;
 -
 +      SceneRenderLayer *srl;
 +      
        base= sce->base.first;
-       while(base) {
+       while (base) {
                base->object->id.us--;
                base= base->next;
        }
Simple merge
index 675dad4aa01c27dfee1b996af842c21ce5d4c368,6366b46dfa716a25ab5a6ac8774eec859212eefc..ed7234dc48c534c4e713b06b6ffb507681ab3e35
@@@ -13352,28 -13146,25 +13335,47 @@@ static void do_versions(FileData *fd, L
                }
        }
  
+       if (main->versionfile < 263)
+       {
+               /* set fluidsim rate. the version patch for this in 2.62 was wrong, so
+                  try to correct it, if rate is 0.0 that's likely not intentional */
+               Object *ob;
+               for (ob = main->object.first; ob; ob = ob->id.next) {
+                       ModifierData *md;
+                       for (md = ob->modifiers.first; md; md = md->next) {
+                               if (md->type == eModifierType_Fluidsim) {
+                                       FluidsimModifierData *fmd = (FluidsimModifierData *)md;
+                                       if(fmd->fss->animRate == 0.0f)
+                                               fmd->fss->animRate = 1.0f;
+                               }
+                       }
+               }
+       }
 +      /* default values in Freestyle settings */
 +      {
 +              Scene *sce;
 +              SceneRenderLayer *srl;
 +              FreestyleLineStyle *linestyle;
 +
 +              for(sce = main->scene.first; sce; sce = sce->id.next) {
 +                      for(srl= sce->r.layers.first; srl; srl= srl->next) {
 +                              if (srl->freestyleConfig.mode == 0)
 +                                      srl->freestyleConfig.mode= FREESTYLE_CONTROL_EDITOR_MODE;
 +                              if (srl->freestyleConfig.raycasting_algorithm == 0)
 +                                      srl->freestyleConfig.raycasting_algorithm= FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE;
 +                      }
 +              }
 +              for(linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
 +                      if (linestyle->chaining == 0)
 +                              linestyle->chaining= LS_CHAINING_PLAIN;
 +                      if (linestyle->rounds == 0)
 +                              linestyle->rounds= 3;
 +              }
 +      }
 +      
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! */
        /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */
  
Simple merge
index 87abf0e8548b20d79e49cfe492f42b50ba107937,497296748c6458c4469b7f59a749bf205b0361d4..90c62df724aa9a6c25ac130b9920706ef0b01d17
@@@ -2480,10 -2483,11 +2494,11 @@@ static int draw_dm_faces_sel__setDrawOp
        
        if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
                if (efa == data->efa_act) {
 -                      glColor4ubv(data->cols[2]);
 +                      glColor4ubv(data->cols[3]);
                        return 2; /* stipple */
-               } else {
+               }
+               else {
 -                      col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT)?1:0];
 +                      col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT)?1:BM_elem_flag_test(efa, BM_ELEM_FREESTYLE)?2:0];
                        if (col[3]==0) return 0;
                        glColor4ubv(col);
                        return 1;
@@@ -2507,16 -2511,16 +2522,16 @@@ static int draw_dm_faces_sel__compareDr
        efa= EDBM_get_face_for_index(data->em, data->orig_index[index]);
        next_efa= EDBM_get_face_for_index(data->em, data->orig_index[next_index]);
  
-       if(efa == next_efa)
+       if (efa == next_efa)
                return 1;
  
-       if(efa == data->efa_act || next_efa == data->efa_act)
+       if (efa == data->efa_act || next_efa == data->efa_act)
                return 0;
  
 -      col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT)?1:0];
 -      next_col = data->cols[BM_elem_flag_test(next_efa, BM_ELEM_SELECT)?1:0];
 +      col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT)?1:BM_elem_flag_test(efa, BM_ELEM_FREESTYLE)?2:0];
 +      next_col = data->cols[BM_elem_flag_test(next_efa, BM_ELEM_SELECT)?1:BM_elem_flag_test(next_efa, BM_ELEM_FREESTYLE)?2:0];
  
-       if(col[3]==0 || next_col[3]==0)
+       if (col[3]==0 || next_col[3]==0)
                return 0;
  
        return col == next_col;
@@@ -3025,8 -3037,8 +3049,8 @@@ static void draw_em_fancy(Scene *scene
                }
        }
        
-       if(me->drawflag & ME_DRAWFACES) {       /* transp faces */
+       if (me->drawflag & ME_DRAWFACES) {      /* transp faces */
 -              unsigned char col1[4], col2[4], col3[4];
 +              unsigned char col1[4], col2[4], col3[4], col4[4];
                        
                UI_GetThemeColor4ubv(TH_FACE, col1);
                UI_GetThemeColor4ubv(TH_FACE_SELECT, col2);
                        glLineWidth(1);
                }
        
-               if(me->drawflag & ME_DRAWCREASES && CustomData_has_layer(&em->bm->edata, CD_CREASE)) {
 +              if(me->drawflag & ME_DRAW_FREESTYLE_EDGE) {
 +                      UI_ThemeColor(TH_FREESTYLE_EDGE_MARK);
 +                      glLineWidth(2);
 +      
 +                      draw_dm_edges_freestyle(em, cageDM);
 +      
 +                      glColor3ub(0,0,0);
 +                      glLineWidth(1);
 +              }
 +      
+               if (me->drawflag & ME_DRAWCREASES && CustomData_has_layer(&em->bm->edata, CD_CREASE)) {
                        draw_dm_creases(em, cageDM);
                }
-               if(me->drawflag & ME_DRAWBWEIGHTS) {
+               if (me->drawflag & ME_DRAWBWEIGHTS) {
                        draw_dm_bweights(em, scene, cageDM);
                }
  
Simple merge
index e9c8d50ef8512e83d6ceff536041c2e83d1986d4,996ee5427695d6d57d6407f2f6a28202ce793a59..a755c916ef385fdc04c5aa3c4d048827e92b33a1
@@@ -5,8 -5,7 +5,8 @@@
  Import ('env')
  
  incs = '. ../editors/include ../makesdna ../makesrna ../blenfont ../blenlib ../blenkernel ../nodes'
- incs += ' ../imbuf ../blenloader ../gpu ../render/extern/include ../windowmanager'
+ incs += ' ../imbuf ../blenloader ../bmesh ../gpu ../render/extern/include ../windowmanager'
 +incs += ' ../freestyle/intern/python'
  incs += ' #intern/guardedalloc #intern/memutil #extern/glew/include #intern/cycles/blender'
  incs += ' #intern/audaspace/intern ' + env['BF_PYTHON_INC']
  
index 432f0a2aa8c1c94d7b100ecf9d3d4c2a3635a787,35174834a47417cc30c635167c2b01591e652649..19a71892db03fa1e7c44f222b3b9c3ff98375261
@@@ -798,7 -797,7 +798,8 @@@ endif(
                bf_python
                bf_python_ext
                bf_python_mathutils
+               bf_python_bmesh
 +              bf_freestyle
                bf_ikplugin
                bf_bmesh
                bf_modifiers