[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15542] branches/soc-2008-mxcurioni: soc-2008-mxcurioni: merge with trunk - rev 15540
Maxime Curioni
maxime.curioni at gmail.com
Sat Jul 12 07:02:48 CEST 2008
Revision: 15542
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15542
Author: mxcurioni
Date: 2008-07-12 07:02:47 +0200 (Sat, 12 Jul 2008)
Log Message:
-----------
soc-2008-mxcurioni: merge with trunk - rev 15540
Revision Links:
--------------
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15540
Modified Paths:
--------------
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemWin32.cpp
branches/soc-2008-mxcurioni/intern/moto/include/GEN_Map.h
branches/soc-2008-mxcurioni/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_bmeshCustomData.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_customdata.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_Customdata.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_conversions.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_eulers.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_structure.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_tools.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/customdata.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/library.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/modifier.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/particle.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/particle_system.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/pointcache.c
branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_mempool.h
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/BLI_kdopbvh.c
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/BLI_mempool.c
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/storage.c
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/util.c
branches/soc-2008-mxcurioni/source/blender/imbuf/intern/openexr/openexr_api.cpp
branches/soc-2008-mxcurioni/source/blender/include/BDR_drawobject.h
branches/soc-2008-mxcurioni/source/blender/include/BIF_editarmature.h
branches/soc-2008-mxcurioni/source/blender/include/BSE_sequence.h
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_actuator_types.h
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_space_types.h
branches/soc-2008-mxcurioni/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c
branches/soc-2008-mxcurioni/source/blender/python/api2_2x/sceneSequence.c
branches/soc-2008-mxcurioni/source/blender/radiosity/intern/source/radrender.c
branches/soc-2008-mxcurioni/source/blender/render/intern/source/convertblender.c
branches/soc-2008-mxcurioni/source/blender/src/buttons_logic.c
branches/soc-2008-mxcurioni/source/blender/src/buttons_object.c
branches/soc-2008-mxcurioni/source/blender/src/buttons_scene.c
branches/soc-2008-mxcurioni/source/blender/src/buttons_shading.c
branches/soc-2008-mxcurioni/source/blender/src/drawarmature.c
branches/soc-2008-mxcurioni/source/blender/src/drawimage.c
branches/soc-2008-mxcurioni/source/blender/src/drawobject.c
branches/soc-2008-mxcurioni/source/blender/src/drawview.c
branches/soc-2008-mxcurioni/source/blender/src/editarmature.c
branches/soc-2008-mxcurioni/source/blender/src/editmesh_add.c
branches/soc-2008-mxcurioni/source/blender/src/editnla.c
branches/soc-2008-mxcurioni/source/blender/src/editsima.c
branches/soc-2008-mxcurioni/source/blender/src/edittime.c
branches/soc-2008-mxcurioni/source/blender/src/header_image.c
branches/soc-2008-mxcurioni/source/blender/src/header_view3d.c
branches/soc-2008-mxcurioni/source/blender/src/sequence.c
branches/soc-2008-mxcurioni/source/blender/src/space.c
branches/soc-2008-mxcurioni/source/blender/src/transform_conversions.c
branches/soc-2008-mxcurioni/source/blender/src/usiblender.c
branches/soc-2008-mxcurioni/source/blender/src/view.c
branches/soc-2008-mxcurioni/source/blender/src/vpaint.c
branches/soc-2008-mxcurioni/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_ActionActuator.cpp
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_ActionActuator.h
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_BlenderDataConversion.cpp
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_MeshDeformer.cpp
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_MeshDeformer.h
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_ShapeDeformer.h
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_SkinDeformer.cpp
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_SkinDeformer.h
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_SkinMeshObject.cpp
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_SkinMeshObject.h
branches/soc-2008-mxcurioni/source/gameengine/Converter/KX_ConvertActuators.cpp
branches/soc-2008-mxcurioni/source/gameengine/Expressions/PyObjectPlus.h
branches/soc-2008-mxcurioni/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
branches/soc-2008-mxcurioni/source/gameengine/GameLogic/SCA_IActuator.h
branches/soc-2008-mxcurioni/source/gameengine/GameLogic/SCA_IObject.cpp
branches/soc-2008-mxcurioni/source/gameengine/GameLogic/SCA_IObject.h
branches/soc-2008-mxcurioni/source/gameengine/GameLogic/SCA_ISensor.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/BL_BlenderShader.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/BL_BlenderShader.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/BL_Material.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/BL_Material.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_BlenderMaterial.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_GameObject.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_GameObject.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_IPO_SGController.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_IPO_SGController.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_IpoActuator.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_IpoActuator.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_KetsjiEngine.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_Light.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_Light.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_ParentActuator.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_Scene.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_Scene.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_TouchEventManager.cpp
branches/soc-2008-mxcurioni/source/gameengine/PyDoc/BL_ActionActuator.py
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_BucketManager.cpp
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_IRasterizer.h
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_MaterialBucket.h
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_MeshObject.cpp
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_MeshObject.h
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_TexVert.cpp
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_TexVert.h
branches/soc-2008-mxcurioni/source/gameengine/SceneGraph/SG_Controller.h
branches/soc-2008-mxcurioni/source/kernel/gen_system/GEN_HashedPtr.h
branches/soc-2008-mxcurioni/source/kernel/gen_system/GEN_Map.h
branches/soc-2008-mxcurioni/tools/Blender.py
Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemWin32.cpp 2008-07-12 05:00:37 UTC (rev 15541)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemWin32.cpp 2008-07-12 05:02:47 UTC (rev 15542)
@@ -302,6 +302,15 @@
{
GHOST_TSuccess success = GHOST_System::init();
+ /* Disable scaling on high DPI displays on Vista */
+ HMODULE user32 = ::LoadLibraryA("user32.dll");
+ typedef BOOL (WINAPI * LPFNSETPROCESSDPIAWARE)();
+ LPFNSETPROCESSDPIAWARE SetProcessDPIAware =
+ (LPFNSETPROCESSDPIAWARE)GetProcAddress(user32, "SetProcessDPIAware");
+ if (SetProcessDPIAware)
+ SetProcessDPIAware();
+ FreeLibrary(user32);
+
// Determine whether this system has a high frequency performance counter. */
m_hasPerformanceCounter = ::QueryPerformanceFrequency((LARGE_INTEGER*)&m_freq) == TRUE;
if (m_hasPerformanceCounter) {
Modified: branches/soc-2008-mxcurioni/intern/moto/include/GEN_Map.h
===================================================================
--- branches/soc-2008-mxcurioni/intern/moto/include/GEN_Map.h 2008-07-12 05:00:37 UTC (rev 15541)
+++ branches/soc-2008-mxcurioni/intern/moto/include/GEN_Map.h 2008-07-12 05:02:47 UTC (rev 15542)
@@ -82,6 +82,24 @@
}
return 0;
}
+
+ Key* getKey(int index) {
+ int count=0;
+ for (int i=0;i<m_num_buckets;i++)
+ {
+ Entry* bucket = m_buckets[i];
+ while(bucket)
+ {
+ if (count==index)
+ {
+ return &bucket->m_key;
+ }
+ bucket = bucket->m_next;
+ count++;
+ }
+ }
+ return 0;
+ }
void clear() {
for (int i = 0; i < m_num_buckets; ++i) {
Modified: branches/soc-2008-mxcurioni/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj
===================================================================
--- branches/soc-2008-mxcurioni/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj 2008-07-12 05:00:37 UTC (rev 15541)
+++ branches/soc-2008-mxcurioni/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj 2008-07-12 05:02:47 UTC (rev 15542)
@@ -359,6 +359,9 @@
RelativePath="..\..\..\source\blender\blenlib\intern\BLI_memarena.c">
</File>
<File
+ RelativePath="..\..\..\source\blender\blenlib\intern\BLI_mempool.c">
+ </File>
+ <File
RelativePath="..\..\..\source\blender\blenlib\intern\boxpack2d.c">
</File>
<File
@@ -474,6 +477,9 @@
RelativePath="..\..\..\source\blender\blenlib\BLI_memarena.h">
</File>
<File
+ RelativePath="..\..\..\source\blender\blenlib\BLI_mempool.h">
+ </File>
+ <File
RelativePath="..\..\..\source\blender\blenlib\intern\BLI_scanfill.h">
</File>
<File
Modified: branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_bmeshCustomData.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_bmeshCustomData.h 2008-07-12 05:00:37 UTC (rev 15541)
+++ branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_bmeshCustomData.h 2008-07-12 05:02:47 UTC (rev 15542)
@@ -38,7 +38,7 @@
#ifndef BKE_BMESHCUSTOMDATA_H
#define BKE_BMESHCUSTOMDATA_H
-struct BME_mempool;
+struct BLI_mempool;
/*Custom Data Types and defines
Eventual plan is to move almost everything to custom data and let caller
@@ -62,7 +62,7 @@
typedef struct BME_CustomData {
struct BME_CustomDataLayer *layers; /*Custom Data Layers*/
- struct BME_mempool *pool; /*pool for alloc of blocks*/
+ struct BLI_mempool *pool; /*pool for alloc of blocks*/
int totlayer, totsize; /*total layers and total size in bytes of each block*/
} BME_CustomData;
Modified: branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_customdata.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_customdata.h 2008-07-12 05:00:37 UTC (rev 15541)
+++ branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_customdata.h 2008-07-12 05:02:47 UTC (rev 15542)
@@ -41,6 +41,7 @@
extern const CustomDataMask CD_MASK_EDITMESH;
extern const CustomDataMask CD_MASK_DERIVEDMESH;
extern const CustomDataMask CD_MASK_BMESH;
+extern const CustomDataMask CD_MASK_FACECORNERS;
/* for ORIGINDEX layer type, indicates no original index for this element */
#define ORIGINDEX_NONE -1
@@ -264,4 +265,9 @@
/* for file reading compatibility, returns false if the layer was freed,
only after this test passes, layer->data should be assigned */
int CustomData_verify_versions(struct CustomData *data, int index);
+
+/*BMesh specific customdata stuff*/
+void CustomData_to_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata);
+void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata, int total);
+void CustomData_bmesh_init_pool(struct CustomData *data, int allocsize);
#endif
Modified: branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_Customdata.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_Customdata.c 2008-07-12 05:00:37 UTC (rev 15541)
+++ branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_Customdata.c 2008-07-12 05:02:47 UTC (rev 15542)
@@ -40,6 +40,7 @@
#include "bmesh_private.h"
#include <string.h>
#include "MEM_guardedalloc.h"
+#include "BLI_mempool.h"
/********************* Layer type information **********************/
typedef struct BME_LayerTypeInfo {
@@ -83,7 +84,7 @@
if(data->totlayer){
/*alloc memory*/
data->layers = MEM_callocN(sizeof(BME_CustomDataLayer)*data->totlayer, "BMesh Custom Data Layers");
- data->pool = BME_mempool_create(data->totsize, initalloc, initalloc);
+ data->pool = BLI_mempool_create(data->totsize, initalloc, initalloc);
/*initialize layer data*/
for(i=0; i < BME_CD_NUMTYPES; i++){
if(init->layout[i]){
@@ -102,7 +103,7 @@
void BME_CD_Free(BME_CustomData *data)
{
- if(data->pool) BME_mempool_destroy(data->pool);
+ if(data->pool) BLI_mempool_destroy(data->pool);
}
/*Block level ops*/
@@ -119,7 +120,7 @@
typeInfo->free((char*)*block + offset, 1, typeInfo->size);
}
}
- BME_mempool_free(data->pool, *block);
+ BLI_mempool_free(data->pool, *block);
*block = NULL;
}
@@ -130,7 +131,7 @@
if (*block) BME_CD_free_block(data, block); //if we copy layers that have their own free functions like deformverts
if (data->totsize > 0)
- *block = BME_mempool_alloc(data->pool);
+ *block = BLI_mempool_alloc(data->pool);
else
*block = NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_conversions.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_conversions.c 2008-07-12 05:00:37 UTC (rev 15541)
+++ branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/BME_conversions.c 2008-07-12 05:02:47 UTC (rev 15542)
@@ -55,14 +55,200 @@
#include "bmesh_private.h"
#include "BSE_edit.h"
-/*Converts an EditMesh to a BME_Mesh.*/
-static void bmesh_init_cdPool(CustomData *data, int allocsize){
- if(data->totlayer)data->pool = BLI_mempool_create(data->totsize, allocsize, allocsize);
+
+/*merge these functions*/
+static void BME_DMcorners_to_loops(BME_Mesh *bm, CustomData *facedata, int index, BME_Poly *f, int numCol, int numTex){
+ int i, j;
+ BME_Loop *l;
+ MTFace *texface;
+ MTexPoly *texpoly;
+ MCol *mcol;
+ MLoopCol *mloopcol;
+ MLoopUV *mloopuv;
+
+ for(i=0; i< numTex; i++){
+ texface = CustomData_get_layer_n(facedata, CD_MTFACE, i);
+ texpoly = CustomData_bmesh_get_n(&bm->pdata, f->data, CD_MTEXPOLY, i);
+
+ texpoly->tpage = texface[index].tpage;
+ texpoly->flag = texface[index].flag;
+ texpoly->transp = texface[index].transp;
+ texpoly->mode = texface[index].mode;
+ texpoly->tile = texface[index].tile;
+ texpoly->unwrap = texface[index].unwrap;
+
+ j = 0;
+ l = f->loopbase;
+ do{
+ mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPUV, i);
+ mloopuv->uv[0] = texface[index].uv[j][0];
+ mloopuv->uv[1] = texface[index].uv[j][1];
+ j++;
+ l = l->next;
+ }while(l!=f->loopbase);
+ }
+
+ for(i=0; i < numCol; i++){
+ mcol = CustomData_get_layer_n(facedata, CD_MCOL, i);
+ j = 0;
+ l = f->loopbase;
+ do{
+ mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPCOL, i);
+ mloopcol->r = mcol[(index*4)+j].r;
+ mloopcol->g = mcol[(index*4)+j].g;
+ mloopcol->b = mcol[(index*4)+j].b;
+ mloopcol->a = mcol[(index*4)+j].a;
+ j++;
+ l = l->next;
+ }while(l!=f->loopbase);
+ }
}
+static void BME_DMloops_to_corners(BME_Mesh *bm, CustomData *facedata, int index, BME_Poly *f,int numCol, int numTex){
+ int i, j;
+ BME_Loop *l;
+ MTFace *texface;
+ MTexPoly *texpoly;
+ MCol *mcol;
+ MLoopCol *mloopcol;
+ MLoopUV *mloopuv;
+
+ for(i=0; i < numTex; i++){
+ texface = CustomData_get_layer_n(facedata, CD_MTFACE, i);
+ texpoly = CustomData_bmesh_get_n(&bm->pdata, f->data, CD_MTEXPOLY, i);
+
+ texface[index].tpage = texpoly->tpage;
+ texface[index].flag = texpoly->flag;
+ texface[index].transp = texpoly->transp;
+ texface[index].mode = texpoly->mode;
+ texface[index].tile = texpoly->tile;
+ texface[index].unwrap = texpoly->unwrap;
+
+ j = 0;
+ l = f->loopbase;
+ do{
+ mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPUV, i);
+ texface[index].uv[j][0] = mloopuv->uv[0];
+ texface[index].uv[j][1] = mloopuv->uv[1];
+ j++;
+ l = l->next;
+ }while(l!=f->loopbase);
+
+ }
+ for(i=0; i < numCol; i++){
+ mcol = CustomData_get_layer_n(facedata,CD_MCOL, i);
+ j = 0;
+ l = f->loopbase;
+ do{
+ mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPCOL, i);
+ mcol[(index*4) + j].r = mloopcol->r;
+ mcol[(index*4) + j].g = mloopcol->g;
+ mcol[(index*4) + j].b = mloopcol->b;
+ mcol[(index*4) + j].a = mloopcol->a;
+ j++;
+ l = l->next;
+ }while(l!=f->loopbase);
+ }
+}
+
+
+static void BME_corners_to_loops(BME_Mesh *bm, CustomData *facedata, void *face_block, BME_Poly *f,int numCol, int numTex){
+ int i, j;
+ BME_Loop *l;
+ MTFace *texface;
+ MTexPoly *texpoly;
+ MCol *mcol;
+ MLoopCol *mloopcol;
+ MLoopUV *mloopuv;
+
+ for(i=0; i < numTex; i++){
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list