svn merge -r39493:39664 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorCampbell Barton <ideasman42@gmail.com>
Wed, 24 Aug 2011 02:29:45 +0000 (02:29 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 24 Aug 2011 02:29:45 +0000 (02:29 +0000)
38 files changed:
1  2 
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/multires.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/blenpluginapi/SConscript
source/blender/editors/armature/SConscript
source/blender/editors/armature/editarmature.c
source/blender/editors/mesh/SConscript
source/blender/editors/object/SConscript
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/physics/SConscript
source/blender/editors/render/SConscript
source/blender/editors/render/render_shading.c
source/blender/editors/screen/SConscript
source/blender/editors/sculpt_paint/SConscript
source/blender/editors/space_node/SConscript
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/transform/transform.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/makesdna/intern/SConscript
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/rna_scene.c
source/blender/render/SConscript
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/strand.c
source/blender/windowmanager/SConscript
source/creator/CMakeLists.txt
source/creator/creator.c

index ab2b08cbec62b4594c46217350f99b9213e64402,b159106f7488123e75fb6e2fdad365b9ec0ae7cd..dcfb8936c4ca8680389af468848ea52333140f70
@@@ -874,15 -815,8 +874,15 @@@ int BLI_edgefill(short mat_nr
        while(eve) {
                if(v2) {
                        if( compare_v3v3(v2, eve->co, COMPLIMIT)==0) {
 +                              float inner = angle_v3v3v3(v1, v2, eve->co);
 +                              
 +                              if (fabs(inner-M_PI) < limit || fabs(inner) < limit) {
 +                                      eve = eve->next;        
 +                                      continue;
 +                              }
 +
                                len= normal_tri_v3( norm,v1, v2, eve->co);
-                               if(len != 0.0) break;
+                               if(len != 0.0f) break;
                        }
                }
                else if(compare_v3v3(v1, eve->co, COMPLIMIT)==0) {
index e9694bab63f240c3817a6fdf714aa258472db9e0,b7f9a263bc11f9e0f7ec02521f94a2b02f87d162..23e4da5ca4183968eeccd27a2c063c84fe9a92d3
@@@ -5,10 -5,9 +5,10 @@@ sources = env.Glob('*.c'
  
  incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf ../../blenloader'
  incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 +incs += ' ../../render/extern/include ../../bmesh'
  incs += ' ../../gpu ../../makesrna #/intern/opennl/extern'
  
- if env['OURPLATFORM'] == 'linux2':
+ if env['OURPLATFORM'] == 'linux':
      cflags='-pthread'
      incs += ' ../../../extern/binreloc/include'
  
index dc352e07fec48f8529876f9dbf44d2c168323f1a,b992ae5f04c7067b681d92a9dd92b7a636933ac2..88df192c2faee2a37f3f8951d0c4625524dd1624
@@@ -7,9 -7,8 +7,9 @@@ incs = '../include ../../blenlib ../../
  incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
  incs += ' ../../gpu ../../blenloader'
  incs += ' ../../makesrna ../../render/extern/include  #/intern/elbeem/extern'
 +incs += ' ../../bmesh ../uvedit '
  
- if env['OURPLATFORM'] == 'linux2':
+ if env['OURPLATFORM'] == 'linux':
      cflags='-pthread'
      incs += ' ../../../extern/binreloc/include'
  
index bd6dcf73546cfa14846a28e8f1e7d2a57faa045a,53418500ea64bf2dd6b5e3d6c1a05f080f349b26..1f93db653f5b171de293d78d129a34244b6f047e
@@@ -7,9 -7,9 +7,9 @@@ incs = '../include ../../blenlib ../../
  incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
  incs += ' ../../gpu'
  incs += ' ../../makesrna ../../render/extern/include  #/intern/elbeem/extern'
 -incs += ' ../../blenloader'
 +incs += ' ../../blenloader ../../bmesh'
  
- if env['OURPLATFORM'] == 'linux2':
+ if env['OURPLATFORM'] == 'linux':
      cflags='-pthread'
      incs += ' ../../../extern/binreloc/include'
  
index 829a2760d1a692412fc240e9e632b357dab5492d,b3927fcee6870570e8d8236b94652554a6443c42..8f1f47b5004bb4d994803cb313eb12d21959273d
@@@ -8,9 -8,9 +8,9 @@@ defs = [
  incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
  incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
  incs += ' ../../render/extern/include'
 -incs += ' ../../gpu ../../makesrna ../../blenloader'
 +incs += ' ../../gpu ../../makesrna ../../blenloader ../../bmesh'
  
- if env['OURPLATFORM'] == 'linux2':
+ if env['OURPLATFORM'] == 'linux':
      cflags='-pthread'
      incs += ' ../../../extern/binreloc/include'
  
index 6a5556e3e51f711282d5612bb27994290f3c6a41,c4309dcfca341922259d550006f25ec03bb8323f..a21b27502a844151b6ca0833a198912dbf6d539a
@@@ -14,8 -14,8 +14,8 @@@ if env['OURPLATFORM'] in ('win32-vc', '
  if env['CC'] == 'gcc':
      #cf.append('-Werror')
      pass
 -
 +      
- if env['OURPLATFORM'] == 'linux2':
+ if env['OURPLATFORM'] == 'linux':
      cflags='-pthread'
      incs += ' ../../../extern/binreloc/include'
  
index b1558a98ff682cc14aee15862e0751e1d5aa2a60,e8a7896abd51f55ae20563c7bfa455d31f6d7dc7..fd6514f12813e4ca472e17827b7902818dcde11a
@@@ -214,111 -195,63 +214,104 @@@ static ParamHandle *construct_param_han
        }
        
        /* we need the vert indices */
 -      for(ev= em->verts.first, a=0; ev; ev= ev->next, a++)
 -              ev->tmp.l = a;
 +      a = 0;
 +      BM_ITER(ev, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
 +              BM_SetIndex(ev, a);
 +              a++;
 +      }
        
 -      for(efa= em->faces.first; efa; efa= efa->next) {
 +      BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
 +              EditVert *v, *lastv, *firstv;
 +              EditFace *sefa;
                ParamKey key, vkeys[4];
                ParamBool pin[4], select[4];
 +              BMLoop *ls[3];
 +              MLoopUV *luvs[3];
                float *co[4];
                float *uv[4];
 -              int nverts;
 -              
 -              if((efa->h) || (sel && (efa->f & SELECT)==0))
 -                      continue;
 +              int lsel;
-               
-               if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
-                       if(BM_TestHFlag(efa, BM_HIDDEN)) {
-                               continue;
-                       }
-               }
-               else {
-                       if((BM_TestHFlag(efa, BM_HIDDEN)) || (sel && BM_TestHFlag(efa, BM_SELECT)==0)) 
-                               continue;
-               }
 -              tf= (MTFace *)CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
 -              
 -              if(implicit &&
 -                      !(      uvedit_uv_selected(scene, efa, tf, 0) ||
 -                              uvedit_uv_selected(scene, efa, tf, 1) ||
 -                              uvedit_uv_selected(scene, efa, tf, 2) ||
 -                              (efa->v4 && uvedit_uv_selected(scene, efa, tf, 3)) )
 -              ) {
++              if((BM_TestHFlag(efa, BM_HIDDEN)) || (sel && BM_TestHFlag(efa, BM_SELECT)==0))
+                       continue;
 +
 +              tf= (MTexPoly *)CustomData_em_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
 +              lsel = 0;
 +
 +              BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
 +                      if (uvedit_uv_selected(em, scene, l)) {
 +                              lsel = 1;
 +                              break;
 +                      }
                }
  
 +              if (implicit && !lsel)
 +                      continue;
 +
                key = (ParamKey)efa;
 -              vkeys[0] = (ParamKey)efa->v1->tmp.l;
 -              vkeys[1] = (ParamKey)efa->v2->tmp.l;
 -              vkeys[2] = (ParamKey)efa->v3->tmp.l;
 -
 -              co[0] = efa->v1->co;
 -              co[1] = efa->v2->co;
 -              co[2] = efa->v3->co;
 -
 -              uv[0] = tf->uv[0];
 -              uv[1] = tf->uv[1];
 -              uv[2] = tf->uv[2];
 -
 -              pin[0] = ((tf->unwrap & TF_PIN1) != 0);
 -              pin[1] = ((tf->unwrap & TF_PIN2) != 0);
 -              pin[2] = ((tf->unwrap & TF_PIN3) != 0);
 -
 -              select[0] = ((uvedit_uv_selected(scene, efa, tf, 0)) != 0);
 -              select[1] = ((uvedit_uv_selected(scene, efa, tf, 1)) != 0);
 -              select[2] = ((uvedit_uv_selected(scene, efa, tf, 2)) != 0);
 -
 -              if(efa->v4) {
 -                      vkeys[3] = (ParamKey)efa->v4->tmp.l;
 -                      co[3] = efa->v4->co;
 -                      uv[3] = tf->uv[3];
 -                      pin[3] = ((tf->unwrap & TF_PIN4) != 0);
 -                      select[3] = (uvedit_uv_selected(scene, efa, tf, 3) != 0);
 -                      nverts = 4;
 +
 +              /*scanfill time!*/
 +              BLI_begin_edgefill();
 +              
 +              firstv = lastv = NULL;
 +              BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
 +                      int i;
 +                      
 +                      v = BLI_addfillvert(l->v->co);
 +                      
 +                      /*add small random offset*/
 +                      for (i=0; i<3; i++) {
 +                              v->co[i] += (BLI_drand()-0.5f)*FLT_EPSILON*50;
 +                      }
 +                      
 +                      v->tmp.p = l;
 +
 +                      if (lastv) {
 +                              BLI_addfilledge(lastv, v);
 +                      }
 +
 +                      lastv = v;
 +                      if (!firstv) 
 +                              firstv = v;
                }
 -              else
 -                      nverts = 3;
  
 -              param_face_add(handle, key, nverts, vkeys, co, uv, pin, select);
 +              BLI_addfilledge(firstv, v);
 +              
 +              /*mode 2 enables faster handling of tri/quads*/
 +              BLI_edgefill(2);
 +              for (sefa = fillfacebase.first; sefa; sefa=sefa->next) {
 +                      ls[0] = sefa->v1->tmp.p;
 +                      ls[1] = sefa->v2->tmp.p;
 +                      ls[2] = sefa->v3->tmp.p;
 +                      
 +                      luvs[0] = CustomData_bmesh_get(&em->bm->ldata, ls[0]->head.data, CD_MLOOPUV);
 +                      luvs[1] = CustomData_bmesh_get(&em->bm->ldata, ls[1]->head.data, CD_MLOOPUV);
 +                      luvs[2] = CustomData_bmesh_get(&em->bm->ldata, ls[2]->head.data, CD_MLOOPUV);
 +
 +                      vkeys[0] = (ParamKey)BM_GetIndex(ls[0]->v);
 +                      vkeys[1] = (ParamKey)BM_GetIndex(ls[1]->v);
 +                      vkeys[2] = (ParamKey)BM_GetIndex(ls[2]->v);
 +
 +                      co[0] = ls[0]->v->co;
 +                      co[1] = ls[1]->v->co;
 +                      co[2] = ls[2]->v->co;
 +
 +                      uv[0] = luvs[0]->uv;
 +                      uv[1] = luvs[1]->uv;
 +                      uv[2] = luvs[2]->uv;
 +
 +                      pin[0] = (luvs[0]->flag & MLOOPUV_PINNED) != 0;
 +                      pin[1] = (luvs[1]->flag & MLOOPUV_PINNED) != 0;
 +                      pin[2] = (luvs[2]->flag & MLOOPUV_PINNED) != 0;
 +
 +                      select[0] = uvedit_uv_selected(em, scene, ls[0]) != 0;
 +                      select[1] = uvedit_uv_selected(em, scene, ls[1]) != 0;
 +                      select[2] = uvedit_uv_selected(em, scene, ls[2]) != 0;
 +
 +                      if (!p_face_exists(handle,vkeys,0,1,2))
 +                                      param_face_add(handle, key, 3, vkeys, co, uv, pin, select);
 +              }
 +
 +              BLI_end_edgefill();
        }
  
        if(!implicit) {
@@@ -643,9 -581,11 +636,9 @@@ void ED_uvedit_live_unwrap_begin(Scene 
                return;
        }
  
-       liveHandle = construct_param_handle(scene, em, 0, fillholes, 1, 1);
+       liveHandle = construct_param_handle(scene, em, 0, fillholes, 0, 1);
  
        param_lscm_begin(liveHandle, PARAM_TRUE, abf);
 -      BKE_mesh_end_editmesh(obedit->data, em);
  }
  
  void ED_uvedit_live_unwrap_re_solve(void)
Simple merge
Simple merge
Simple merge
Simple merge