Revision: 15205
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15205
Author:   unclezeiv
Date:     2008-06-12 02:05:26 +0200 (Thu, 12 Jun 2008)

Log Message:
-----------
svn merge -r 15166:15204 
https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/soc-2008-unclezeiv/extern/bFTGL/SConscript
    branches/soc-2008-unclezeiv/extern/libopenjpeg/opj_malloc.h
    branches/soc-2008-unclezeiv/release/datafiles/blenderbuttons
    branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_object.h
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/cdderivedmesh.c
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/library.c
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/object.c
    
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/particle_system.c
    branches/soc-2008-unclezeiv/source/blender/blenlib/BLI_arithb.h
    branches/soc-2008-unclezeiv/source/blender/blenlib/intern/arithb.c
    branches/soc-2008-unclezeiv/source/blender/blenlib/intern/util.c
    branches/soc-2008-unclezeiv/source/blender/include/BIF_resources.h
    branches/soc-2008-unclezeiv/source/blender/include/BSE_view.h
    branches/soc-2008-unclezeiv/source/blender/include/transform.h
    branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_meshdata_types.h
    branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_scene_types.h
    branches/soc-2008-unclezeiv/source/blender/python/BPY_interface.c
    branches/soc-2008-unclezeiv/source/blender/src/blenderbuttons.c
    branches/soc-2008-unclezeiv/source/blender/src/buttons_editing.c
    branches/soc-2008-unclezeiv/source/blender/src/buttons_object.c
    branches/soc-2008-unclezeiv/source/blender/src/drawmesh.c
    branches/soc-2008-unclezeiv/source/blender/src/editmesh_lib.c
    branches/soc-2008-unclezeiv/source/blender/src/editparticle.c
    branches/soc-2008-unclezeiv/source/blender/src/header_view3d.c
    branches/soc-2008-unclezeiv/source/blender/src/space.c
    branches/soc-2008-unclezeiv/source/blender/src/transform.c
    branches/soc-2008-unclezeiv/source/blender/src/transform_generics.c
    branches/soc-2008-unclezeiv/source/blender/src/transform_snap.c
    branches/soc-2008-unclezeiv/source/blender/src/view.c
    
branches/soc-2008-unclezeiv/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_BlenderMaterial.cpp

Added Paths:
-----------
    branches/soc-2008-unclezeiv/extern/libopenjpeg/patches/
    branches/soc-2008-unclezeiv/extern/libopenjpeg/patches/osx.patch

Removed Paths:
-------------
    branches/soc-2008-unclezeiv/extern/libopenjpeg/patches/osx.patch

Modified: branches/soc-2008-unclezeiv/extern/bFTGL/SConscript
===================================================================
--- branches/soc-2008-unclezeiv/extern/bFTGL/SConscript 2008-06-11 23:53:42 UTC 
(rev 15204)
+++ branches/soc-2008-unclezeiv/extern/bFTGL/SConscript 2008-06-12 00:05:26 UTC 
(rev 15205)
@@ -22,7 +22,7 @@
 
 #ftgl_env.Append (CPPDEFINES = defines)
 
-incs = 'include src ' + env['BF_FREETYPE_INC']
+incs = 'include src ' + env['BF_FREETYPE_INC'] + ' ' + env['BF_OPENGL_INC']
 defs = ''
 
 sources = env.Glob('src/*.cpp')

Modified: branches/soc-2008-unclezeiv/extern/libopenjpeg/opj_malloc.h
===================================================================
--- branches/soc-2008-unclezeiv/extern/libopenjpeg/opj_malloc.h 2008-06-11 
23:53:42 UTC (rev 15204)
+++ branches/soc-2008-unclezeiv/extern/libopenjpeg/opj_malloc.h 2008-06-12 
00:05:26 UTC (rev 15205)
@@ -76,8 +76,10 @@
        #if defined(__sun)
                        #define HAVE_MEMALIGN
                #elif defined(__GNUC__)
-                       #define HAVE_MEMALIGN
-                       #include <malloc.h>             
+                        #ifndef __APPLE__
+                           #define HAVE_MEMALIGN
+                           #include <malloc.h>
+                        #endif
                /* Linux x86_64 and OSX always align allocations to 16 bytes */
                #elif !defined(__amd64__) && !defined(__APPLE__)        
                        /* FIXME: Yes, this is a big assumption */

Copied: branches/soc-2008-unclezeiv/extern/libopenjpeg/patches (from rev 15204, 
trunk/blender/extern/libopenjpeg/patches)

Deleted: branches/soc-2008-unclezeiv/extern/libopenjpeg/patches/osx.patch
===================================================================
--- trunk/blender/extern/libopenjpeg/patches/osx.patch  2008-06-11 23:53:42 UTC 
(rev 15204)
+++ branches/soc-2008-unclezeiv/extern/libopenjpeg/patches/osx.patch    
2008-06-12 00:05:26 UTC (rev 15205)
@@ -1,17 +0,0 @@
-Index: opj_malloc.h
-===================================================================
---- opj_malloc.h       (revision 15089)
-+++ opj_malloc.h       (working copy)
-@@ -76,8 +76,10 @@
-       #if defined(__sun)
-                       #define HAVE_MEMALIGN
-               #elif defined(__GNUC__)
--                      #define HAVE_MEMALIGN
--                      #include <malloc.h>             
-+                        #ifndef __APPLE__
-+                          #define HAVE_MEMALIGN
-+                          #include <malloc.h>
-+                        #endif
-               /* Linux x86_64 and OSX always align allocations to 16 bytes */
-               #elif !defined(__amd64__) && !defined(__APPLE__)        
-                       /* FIXME: Yes, this is a big assumption */

Copied: branches/soc-2008-unclezeiv/extern/libopenjpeg/patches/osx.patch (from 
rev 15204, trunk/blender/extern/libopenjpeg/patches/osx.patch)
===================================================================
--- branches/soc-2008-unclezeiv/extern/libopenjpeg/patches/osx.patch            
                (rev 0)
+++ branches/soc-2008-unclezeiv/extern/libopenjpeg/patches/osx.patch    
2008-06-12 00:05:26 UTC (rev 15205)
@@ -0,0 +1,17 @@
+Index: opj_malloc.h
+===================================================================
+--- opj_malloc.h       (revision 15089)
++++ opj_malloc.h       (working copy)
+@@ -76,8 +76,10 @@
+       #if defined(__sun)
+                       #define HAVE_MEMALIGN
+               #elif defined(__GNUC__)
+-                      #define HAVE_MEMALIGN
+-                      #include <malloc.h>             
++                        #ifndef __APPLE__
++                          #define HAVE_MEMALIGN
++                          #include <malloc.h>
++                        #endif
+               /* Linux x86_64 and OSX always align allocations to 16 bytes */
+               #elif !defined(__amd64__) && !defined(__APPLE__)        
+                       /* FIXME: Yes, this is a big assumption */

Modified: branches/soc-2008-unclezeiv/release/datafiles/blenderbuttons
===================================================================
(Binary files differ)

Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_object.h
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_object.h  
2008-06-11 23:53:42 UTC (rev 15204)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_object.h  
2008-06-12 00:05:26 UTC (rev 15205)
@@ -108,6 +108,7 @@
 void minmax_object(struct Object *ob, float *min, float *max);
 void minmax_object_duplis(struct Object *ob, float *min, float *max);
 void solve_tracking (struct Object *ob, float targetmat[][4]);
+int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float 
ray_normal[3]);
 
 void object_handle_update(struct Object *ob);
 

Modified: 
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/DerivedMesh.c  
2008-06-11 23:53:42 UTC (rev 15204)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/DerivedMesh.c  
2008-06-12 00:05:26 UTC (rev 15205)
@@ -186,10 +186,6 @@
 void DM_init(DerivedMesh *dm,
              int numVerts, int numEdges, int numFaces)
 {
-       CustomData_add_layer(&dm->vertData, CD_ORIGINDEX, CD_CALLOC, NULL, 
numVerts);
-       CustomData_add_layer(&dm->edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, 
numEdges);
-       CustomData_add_layer(&dm->faceData, CD_ORIGINDEX, CD_CALLOC, NULL, 
numFaces);
-
        dm->numVertData = numVerts;
        dm->numEdgeData = numEdges;
        dm->numFaceData = numFaces;

Modified: 
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- 
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/cdderivedmesh.c    
    2008-06-11 23:53:42 UTC (rev 15204)
+++ 
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/cdderivedmesh.c    
    2008-06-12 00:05:26 UTC (rev 15205)
@@ -732,6 +732,10 @@
 
        DM_init(dm, numVerts, numEdges, numFaces);
 
+       CustomData_add_layer(&dm->vertData, CD_ORIGINDEX, CD_CALLOC, NULL, 
numVerts);
+       CustomData_add_layer(&dm->edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, 
numEdges);
+       CustomData_add_layer(&dm->faceData, CD_ORIGINDEX, CD_CALLOC, NULL, 
numFaces);
+
        CustomData_add_layer(&dm->vertData, CD_MVERT, CD_CALLOC, NULL, 
numVerts);
        CustomData_add_layer(&dm->edgeData, CD_MEDGE, CD_CALLOC, NULL, 
numEdges);
        CustomData_add_layer(&dm->faceData, CD_MFACE, CD_CALLOC, NULL, 
numFaces);
@@ -753,6 +757,11 @@
         * with an exception for fluidsim */
 
        DM_init(dm, mesh->totvert, mesh->totedge, mesh->totface);
+
+       CustomData_add_layer(&dm->vertData, CD_ORIGINDEX, CD_CALLOC, NULL, 
mesh->totvert);
+       CustomData_add_layer(&dm->edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, 
mesh->totedge);
+       CustomData_add_layer(&dm->faceData, CD_ORIGINDEX, CD_CALLOC, NULL, 
mesh->totface);
+
        dm->deformedOnly = 1;
 
        if(ob && ob->fluidsimSettings && ob->fluidsimSettings->meshSurface)

Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/library.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/library.c      
2008-06-11 23:53:42 UTC (rev 15204)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/library.c      
2008-06-12 00:05:26 UTC (rev 15205)
@@ -934,7 +934,7 @@
        }
 
        /* if result > 21, strncpy don't put the final '\0' to name. */
-       if( result > 21 ) name[21]= 0;
+       if( result >= 21 ) name[21]= 0;
 
        result = check_for_dupid( lb, id, name );
        strcpy( id->name+2, name );

Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/object.c       
2008-06-11 23:53:42 UTC (rev 15204)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/object.c       
2008-06-12 00:05:26 UTC (rev 15205)
@@ -2380,3 +2380,31 @@
        }
        return 1;
 }
+
+/*
+ * Test a bounding box for ray intersection
+ * assumes the ray is already local to the boundbox space
+ */
+int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float 
ray_normal[3])
+{
+       static int triangle_indexes[12][3] = {{0, 1, 2}, {0, 2, 3},
+                                                                               
  {3, 2, 6}, {3, 6, 7},
+                                                                               
  {1, 2, 6}, {1, 6, 5}, 
+                                                                               
  {5, 6, 7}, {4, 5, 7},
+                                                                               
  {0, 3, 7}, {0, 4, 7},
+                                                                               
  {0, 1, 5}, {0, 4, 5}};
+       int result = 0;
+       int i;
+       
+       for (i = 0; i < 12 && result == 0; i++)
+       {
+               float lambda;
+               int v1, v2, v3;
+               v1 = triangle_indexes[i][0];
+               v2 = triangle_indexes[i][1];
+               v3 = triangle_indexes[i][2];
+               result = RayIntersectsTriangle(ray_start, ray_normal, 
bb->vec[v1], bb->vec[v2], bb->vec[v3], &lambda, NULL);
+       }
+       
+       return result;
+}

Modified: 
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- 
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/particle_system.c  
    2008-06-11 23:53:42 UTC (rev 15204)
+++ 
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/particle_system.c  
    2008-06-12 00:05:26 UTC (rev 15205)
@@ -4814,9 +4814,20 @@
                        pa->flag &= ~PARS_NO_DISP;
        }
 
-       /* ok now we're all set so let's go */
-       if(psys->totpart)
-               dynamics_step(ob,psys,psmd,cfra,vg_vel,vg_tan,vg_rot,vg_size);
+       if(psys->totpart) {
+               int dframe, totframesback = 0;
+
+               /* handle negative frame start at the first frame by doing
+                * all the steps before the first frame */
+               if(framenr == startframe && part->sta < startframe)
+                       totframesback = (startframe - (int)part->sta);
+
+               for(dframe=-totframesback; dframe<=0; dframe++) {
+                       /* ok now we're all set so let's go */
+                       
dynamics_step(ob,psys,psmd,cfra+dframe,vg_vel,vg_tan,vg_rot,vg_size);
+                       psys->cfra = cfra+dframe;
+               }
+       }
        
        cache->simframe= framenr;
        cache->flag |= PTCACHE_SIMULATION_VALID;

Modified: branches/soc-2008-unclezeiv/source/blender/blenlib/BLI_arithb.h
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenlib/BLI_arithb.h     
2008-06-11 23:53:42 UTC (rev 15204)
+++ branches/soc-2008-unclezeiv/source/blender/blenlib/BLI_arithb.h     
2008-06-12 00:05:26 UTC (rev 15205)
@@ -258,6 +258,7 @@
 void Vec2Subf(float *v, float *v1, float *v2);
 void Vec2Copyf(float *v1, float *v2);
 
+void AxisAngleToQuat(float *q, float *axis, float angle);
 void vectoquat(float *vec, short axis, short upflag, float *q);
 
 float VecAngle2(float *v1, float *v2);
@@ -269,6 +270,8 @@
 
 void euler_rot(float *beul, float ang, char axis);
        
+void NormalShortToFloat(float *out, short *in);
+void NormalFloatToShort(short *out, float *in);
 
 float DistVL2Dfl(float *v1, float *v2, float *v3);
 float PdistVL2Dfl(float *v1, float *v2, float *v3);
@@ -372,6 +375,7 @@

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to