BMesh branch
authorKen Hughes <khughes@pacific.edu>
Thu, 11 Mar 2010 18:27:45 +0000 (18:27 +0000)
committerKen Hughes <khughes@pacific.edu>
Thu, 11 Mar 2010 18:27:45 +0000 (18:27 +0000)
------------
Fix some gcc warnings and errors (under linux anyway).

18 files changed:
intern/guardedalloc/intern/mallocn.c
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/intern/BME_Customdata.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/bmesh/operators/edgesplitop.c
source/blender/bmesh/operators/mesh_conv.c
source/blender/bmesh/operators/primitiveops.c
source/blender/bmesh/operators/subdivideop.c
source/blender/editors/space_api/spacetypes.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c

index d89983bc938e3a9dfb9d3d418f05fccc47763c45..33ca1ba9a9791faa5b1a9089d13a5f3ecbd4c021 100644 (file)
@@ -85,7 +85,7 @@ static volatile uintptr_t mem_in_use= 0, mmap_in_use= 0;
 
 static volatile struct localListBase _membase;
 static volatile struct localListBase *membase = &_membase;
-static void (*error_callback)(char *) = NULL;
+static void (*error_callback)(const char *) = NULL;
 static void (*thread_lock_callback)(void) = NULL;
 static void (*thread_unlock_callback)(void) = NULL;
 
@@ -147,7 +147,7 @@ int MEM_check_memory_integrity()
 }
 
 
-void MEM_set_error_callback(void (*func)(char *))
+void MEM_set_error_callback(void (*func)(const char *))
 {
        error_callback = func;
 }
index 0284aa277c6a296fcf3d32a44550eaed116224e5..4a09961388772d2b30e39263e3bff65fc57a3894 100644 (file)
@@ -86,6 +86,7 @@
 
 #include "BKE_customdata.h"
 #include "BKE_bvhutils.h"
+#include "BKE_tessmesh.h"
 
 struct MVert;
 struct MEdge;
@@ -641,7 +642,7 @@ void makeDerivedMesh(struct Scene *scene, struct Object *ob, struct BMEditMesh *
 
 /* returns an array of deform matrices for crazyspace correction, and the
    number of modifiers left */
-int editbmesh_get_first_deform_matrices(struct Scene *, struct Object *, struct EditMesh *em,
+int editbmesh_get_first_deform_matrices(struct Scene *, struct Object *, struct BMEditMesh *em,
                                        float (**deformmats)[3][3], float (**deformcos)[3]);
 
 void weight_to_rgb(float input, float *fr, float *fg, float *fb);
index fa6d19f7751b715891099bd8085b53c231665acc..9caffd162f36bdb9496b082296f83da1d4d18200 100644 (file)
@@ -83,7 +83,7 @@ void BME_CD_Create(BME_CustomData *data, BME_CustomDataInit *init, int initalloc
        /*alloc our layers*/
        if(data->totlayer){
                /*alloc memory*/
-               data->layers = MEM_callocN(sizeof(BME_CustomDataLayer)*data->totlayer, "BMesh Custom Data Layers", 1);
+               data->layers = MEM_callocN(sizeof(BME_CustomDataLayer)*data->totlayer, "BMesh Custom Data Layers");
                data->pool = BLI_mempool_create(data->totsize, initalloc, initalloc, 1);
                /*initialize layer data*/
                for(i=0; i < BME_CD_NUMTYPES; i++){
index 34c85c624d3fa3c4681f29e16cece97357311747..fce6b5ae9fcfefbe53661543c2290cb7d0ab3926 100644 (file)
@@ -1113,7 +1113,7 @@ static void emDM_drawFacesTex_common(void *dm,
 
 static void emDM_drawFacesTex(void *dm, int (*setDrawOptions)(MTFace *tface, int has_vcol, int matnr))
 {
-       emDM_drawFacesTex_common(dm, setDrawOptions, NULL, NULL);
+       emDM_drawFacesTex_common(dm, (int (*)(struct MTFace *, struct MCol *, int))setDrawOptions, NULL, NULL);
 }
 
 static void emDM_drawMappedFacesTex(void *dm, int (*setDrawOptions)(void *userData, int index), void *userData)
@@ -1843,7 +1843,8 @@ static void add_weight_mcol_dm(Object *ob, DerivedMesh *dm)
                dliter = dfiter->getLoopsIter(dfiter);
                for (; !dliter->done; dliter->step(dliter), totloop++) {
                        BLI_array_growone(wlcol);
-                       calc_weightpaint_vert_color(ob, coba, dliter->vindex, &wlcol[totloop]);                  
+                       calc_weightpaint_vert_color(ob, coba, dliter->vindex, (unsigned
+char *)&wlcol[totloop]);                        
                }
        }
 
index 5e9f799e49f5e30bcab817bc498a9d59ffbb5396..ddd5405a4c1660dbbd76b8950141499758552b27 100644 (file)
@@ -55,6 +55,7 @@
 #include "DNA_object_types.h"
 #include "DNA_particle_types.h"
 #include "DNA_scene_types.h"
+#include "DNA_windowmanager_types.h"
 #include "DNA_view3d_types.h"
 #include "DNA_vfont_types.h"
 
index 9b5f049f7d1b3a6347e4fcee177a1ff8dabe5bf5..f7a9f284a29fa63a97c8af59ea6875e1a88a6257 100644 (file)
@@ -51,6 +51,7 @@
 #include "DNA_lattice_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_text_types.h"
+#include "DNA_windowmanager_types.h"
 
 #include "BKE_utildefines.h"
 #include "BKE_action.h"
index fb27327c3befb4af0988958db54f15b81926debb..e10159f5b6a2b99a35656972eafa9a8c1f40f592 100644 (file)
@@ -51,6 +51,7 @@
 #include "DNA_key_types.h"  
 #include "DNA_scene_types.h"  
 #include "DNA_vfont_types.h"  
+#include "DNA_meshdata_types.h"  
 
 #include "BKE_animsys.h"
 #include "BKE_anim.h"  
index d15b5fd95e214c889ae9d397315f500e1988c24e..b2dd5bb3d55e9ba317f4d5c3d3191b334160d3e0 100644 (file)
@@ -39,6 +39,7 @@
 #include "DNA_meshdata_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_scene_types.h"
+#include "DNA_windowmanager_types.h"
 
 #include "BKE_shrinkwrap.h"
 #include "BKE_DerivedMesh.h"
index f3b46751bae25bb8e3bc92c45bb57bf711d522db..ad2722f7a75a9bdce75791574f6fede1646a6729 100644 (file)
@@ -28,6 +28,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BKE_utildefines.h"
+#include "BKE_tessmesh.h"
 
 #include "BLI_math.h"
 #include "BLI_rand.h"
@@ -35,6 +36,7 @@
 #include "BLI_array.h"
 
 #include "DNA_object_types.h"
+#include "DNA_windowmanager_types.h"
 
 #include "ED_mesh.h"
 
index ae61cc38b1f9e3ed6e19dd5f4b583f04aeb7dfb3..590e81cd99f89219b73f185a269b9cc43ce30e82 100644 (file)
@@ -10,6 +10,7 @@
 #include "DNA_key_types.h"
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
+#include "DNA_windowmanager_types.h"
 
 #include "BKE_customdata.h" 
 #include "BKE_utildefines.h"
@@ -722,4 +723,4 @@ void bmesh_to_mesh_exec(BMesh *bm, BMOperator *op) {
        }
 
        if(oldverts) MEM_freeN(oldverts);
-}
\ No newline at end of file
+}
index 0b85bacd732e6c8074b5c0add1764f72223c7784..5f2409cbbc8b7bedb9ce5adbc44bed7f1820ae78 100644 (file)
@@ -4,6 +4,7 @@
 #include "DNA_mesh_types.h"
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
+#include "DNA_windowmanager_types.h"
 
 #include "BKE_utildefines.h"
 
index e80515f148437d165cb7683cdc8804346931f202..1611c634204f0ea67c2b11364bc7af0f61e50423 100644 (file)
@@ -28,6 +28,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BKE_utildefines.h"
+#include "BKE_tessmesh.h"
 
 #include "BLI_math.h"
 #include "BLI_rand.h"
@@ -35,6 +36,7 @@
 #include "BLI_array.h"
 
 #include "DNA_object_types.h"
+#include "DNA_windowmanager_types.h"
 
 #include "ED_mesh.h"
 
index a3fe29536a37ad08ade1c56502692367c5fd9c73..d8d3d803634ceaa20b806ca6bfa57da1faf9b643 100644 (file)
@@ -33,6 +33,9 @@
 
 #include "BKE_context.h"
 #include "BKE_screen.h"
+#include "BKE_tessmesh.h"
+
+#include "bmesh.h"
 
 #include "UI_interface.h"
 #include "UI_view2d.h"
index b69b6a552a687138543d9ac501326dbd89bb675e..b9a22745ba5b0dfaff30d0e2c07ed491d9194c72 100644 (file)
@@ -40,6 +40,7 @@
 #include "DNA_texture_types.h"
 #include "DNA_userdef_types.h"
 #include "DNA_windowmanager_types.h"
+#include "DNA_meshdata_types.h"
 
 #include "BKE_colortools.h"
 #include "BKE_context.h"
@@ -52,6 +53,7 @@
 #include "BKE_packedFile.h"
 #include "BKE_report.h"
 #include "BKE_screen.h"
+#include "BKE_tessmesh.h"
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
@@ -66,6 +68,8 @@
 #include "RNA_types.h"
 #include "RNA_enum_types.h"
 
+#include "bmesh.h"
+
 #include "ED_image.h"
 #include "ED_screen.h"
 #include "ED_space_api.h"
index 3d7624a25dc09d9370d1a11a3d6635be7cec87dd..21f43af7980c09319aaac0fc86d5ebefe6cb4754 100644 (file)
@@ -33,6 +33,7 @@
 #include "DNA_scene_types.h"
 #include "DNA_screen_types.h"
 #include "DNA_userdef_types.h"
+#include "DNA_meshdata_types.h"
 
 #include "MEM_guardedalloc.h"
 
index da16182222931cbd338072822e4a7ad9a4598119..e93e05a0a555d28ca9ef02d24d1572c46f583535 100644 (file)
@@ -49,6 +49,7 @@
 #include "DNA_screen_types.h"
 #include "DNA_view3d_types.h"
 #include "DNA_userdef_types.h"
+#include "DNA_windowmanager_types.h"
 
 #include "BKE_bmfont.h"
 #include "BKE_displist.h"
index c79187585de370904fb8b00d0515694927dd35d4..a9ab286b2dc55d4a0373adeee0cf4af5f82bd995 100644 (file)
@@ -62,8 +62,9 @@
 #include "BKE_paint.h"
 #include "BKE_scene.h"
 #include "BKE_screen.h"
-#include "BKE_utildefines.h"
+#include "BKE_tessmesh.h"
 #include "BKE_unit.h"
+#include "BKE_utildefines.h"
 
 #include "RE_pipeline.h"       // make_stars
 
index f0ad6f06abd834fc94615dcb911038ecef595a1c..9e598b2c7ae9663322386228e21416c4200b61b4 100644 (file)
@@ -59,6 +59,7 @@
 #include "BKE_scene.h"
 #include "BKE_screen.h"
 #include "BKE_utildefines.h"
+#include "BKE_tessmesh.h"
 
 #include "RE_pipeline.h"       // make_stars
 
@@ -1366,7 +1367,7 @@ static int viewselected_exec(bContext *C, wmOperator *op) /* like a localview wi
                }
        }
        else if (paint_facesel_test(ob)) {
-               ok= minmax_tface(ob, min, max);
+               ok= minmax_tface(scene, min, max);
        }
        else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT)) {
                ok= PE_minmax(scene, min, max);