Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/intern/packedFile.c4
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c2
-rw-r--r--source/blender/blenlib/intern/voxel.c11
-rw-r--r--source/blender/editors/armature/editarmature.c2
-rw-r--r--source/blender/editors/armature/meshlaplacian.c2
-rw-r--r--source/blender/editors/armature/poseobject.c6
-rw-r--r--source/blender/editors/interface/interface_handlers.c2
-rw-r--r--source/blender/editors/interface/interface_icons.c3
-rw-r--r--source/blender/editors/mesh/editface.c2
-rw-r--r--source/blender/editors/mesh/editmesh.c4
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c4
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c2
-rw-r--r--source/blender/editors/mesh/meshtools.c2
-rw-r--r--source/blender/editors/object/object_edit.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c5
-rw-r--r--source/blender/editors/space_file/filelist.c2
-rw-r--r--source/blender/editors/space_file/writeimage.c6
-rw-r--r--source/blender/editors/space_image/image_buttons.c27
-rw-r--r--source/blender/editors/space_outliner/outliner.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c8
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c5
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c2
-rw-r--r--source/blender/editors/util/editmode_undo.c2
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c3
-rw-r--r--source/blender/python/intern/bpy_driver.c4
-rw-r--r--source/blender/render/intern/source/volumetric.c6
26 files changed, 54 insertions, 66 deletions
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 0c50cea075d..fb973febf04 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -264,7 +264,7 @@ int writePackedFile(ReportList *reports, char *filename, PackedFile *pf, int gui
char tempname[FILE_MAXDIR + FILE_MAXFILE];
/* void *data; */
- if (guimode); //XXX waitcursor(1);
+ if (guimode) {} //XXX waitcursor(1);
strcpy(name, filename);
BLI_path_abs(name, G.sce);
@@ -308,7 +308,7 @@ int writePackedFile(ReportList *reports, char *filename, PackedFile *pf, int gui
}
}
- if(guimode); //XXX waitcursor(0);
+ if(guimode) {} //XXX waitcursor(0);
return (ret_value);
}
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 33c90d1a94e..3c9227fd2a6 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -52,7 +52,7 @@
#include "RNA_access.h"
/* **** XXX **** */
-static void error() {}
+static void error(const char *error, ...) {}
#define INT 96
#define FLO 128
diff --git a/source/blender/blenlib/intern/voxel.c b/source/blender/blenlib/intern/voxel.c
index 31ed116c40a..2b04a49e848 100644
--- a/source/blender/blenlib/intern/voxel.c
+++ b/source/blender/blenlib/intern/voxel.c
@@ -30,12 +30,7 @@
#include "BKE_utildefines.h"
-
-#if defined( _MSC_VER ) && !defined( __cplusplus )
-# define inline __inline
-#endif // defined( _MSC_VER ) && !defined( __cplusplus )
-
-static inline float D(float *data, int *res, int x, int y, int z)
+BM_INLINE float D(float *data, int *res, int x, int y, int z)
{
CLAMP(x, 0, res[0]-1);
CLAMP(y, 0, res[1]-1);
@@ -57,7 +52,7 @@ float voxel_sample_nearest(float *data, int *res, float *co)
}
// returns highest integer <= x as integer (slightly faster than floor())
-inline int FLOORI(float x)
+BM_INLINE int FLOORI(float x)
{
const int r = (int)x;
return ((x >= 0.f) || (float)r == x) ? r : (r - 1);
@@ -65,7 +60,7 @@ inline int FLOORI(float x)
// clamp function, cannot use the CLAMPIS macro, it sometimes returns unwanted results apparently related to gcc optimization flag -fstrict-overflow which is enabled at -O2
// this causes the test (x + 2) < 0 with int x == 2147483647 to return false (x being an integer, x + 2 should wrap around to -2147483647 so the test < 0 should return true, which it doesn't)
-inline int _clamp(int a, int b, int c)
+BM_INLINE int _clamp(int a, int b, int c)
{
return (a < b) ? b : ((a > c) ? c : a);
}
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 5e03dcfbefc..504c5b1e3b1 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -88,7 +88,7 @@
#endif
/* ************* XXX *************** */
-static int okee() {return 0;}
+static int okee(const char *dummy) {return 0;}
static void BIF_undo_push(const char *msg) {}
/* ************* XXX *************** */
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index f0f7bc9eb88..1b1448477ea 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -65,7 +65,7 @@
/* ************* XXX *************** */
static void waitcursor(int val) {}
-static void progress_bar() {}
+static void progress_bar(int dummy_val, const char *dummy) {}
static void start_progress_bar() {}
static void end_progress_bar() {}
static void error(char *str) { printf("error: %s\n", str); }
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 795a27c5642..dcd59a3185a 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -78,9 +78,9 @@
#include "armature_intern.h"
/* ************* XXX *************** */
-static int pupmenu() {return 0;}
-static void error() {};
-static void BIF_undo_push() {}
+static int pupmenu(const char *dummy) {return 0;}
+static void error(const char *dummy) {};
+static void BIF_undo_push(const char *dummy) {}
/* ************* XXX *************** */
/* This function is used to indicate that a bone is selected and needs keyframes inserted */
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 4dd47059e01..426bf7fce04 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -962,7 +962,7 @@ static void ui_but_drop(bContext *C, wmEvent *event, uiBut *but, uiHandleButtonD
if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
ID *id= (ID *)wmd->poin;
- if(but->poin==NULL && but->rnapoin.data==NULL);
+ if(but->poin==NULL && but->rnapoin.data==NULL) {}
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
BLI_strncpy(data->str, id->name+2, data->maxlen);
button_activate_state(C, but, BUTTON_STATE_EXIT);
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 1e2b166ca82..7ffd46c34c7 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -572,8 +572,7 @@ static void init_iconfile_list(struct ListBase *list)
if(!BLI_getwdN(olddir))
restoredir = 0;
totfile = BLI_getdir(icondirstr, &dir);
- if (restoredir && !chdir(olddir))
- ; /* fix warning about checking return value */
+ if (restoredir && !chdir(olddir)) {} /* fix warning about checking return value */
for(i=0; i<totfile; i++) {
if( (dir[i].type & S_IFREG) ) {
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index 7d47473e739..e36035081ce 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -77,7 +77,7 @@
#include "mesh_intern.h"
/* ***************** XXX **************** */
-static int pupmenu() {return 0;}
+static int pupmenu(const char *dummy) {return 0;}
/* ***************** XXX **************** */
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index e3f0d96ccfc..5de869f09d3 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -87,8 +87,8 @@ editmesh.c:
*/
/* XXX */
-static void BIF_undo_push() {}
-static void error() {}
+static void BIF_undo_push(const char *dummy) {}
+static void error(const char *dummy) {}
/* ***************** HASH ********************* */
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index 643785ca200..760c911fdee 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -75,9 +75,9 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv
#include "mesh_intern.h"
/* **** XXX ******** */
-static void BIF_undo_push() {}
+static void BIF_undo_push(const char *dummy) {}
static void BIF_undo() {}
-static void error() {}
+static void error(const char *dummy) {}
static int qtest() {return 0;}
/* **** XXX ******** */
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index e82c289a6ea..612facb85c1 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -90,7 +90,7 @@ editmesh_mods.c, UI level access, no geometry changes
/* XXX */
static void waitcursor(int val) {}
-static int pupmenu() {return 0;}
+static int pupmenu(const char *dummy) {return 0;}
/* ****************************** MIRROR **************** */
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 99bca7e9073..a08e08c25c0 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -83,7 +83,7 @@
#include "mesh_intern.h"
/* XXX */
-static int pupmenu() {return 0;}
+static int pupmenu(const char *dummy) {return 0;}
/* XXX */
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 1ac84eb48ce..6631f5fc0d2 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -110,7 +110,7 @@
#include "object_intern.h" // own include
/* ************* XXX **************** */
-static void error() {}
+static void error(const char *dummy) {}
static void waitcursor(int val) {}
static int pupmenu(const char *msg) {return 0;}
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index c25b5685844..03454a305ba 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -279,8 +279,9 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
if(stroke->stroke_started) {
if(paint_smooth_stroke(stroke, mouse, event)) {
if(paint_space_stroke_enabled(stroke->brush)) {
- if(!paint_space_stroke(C, op, event, mouse))
- ;//ED_region_tag_redraw(ar);
+ if(!paint_space_stroke(C, op, event, mouse)) {
+ //ED_region_tag_redraw(ar);
+ }
}
else
paint_brush_stroke_add_step(C, op, event, mouse);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index ea1307a6784..0674568579e 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -739,7 +739,7 @@ static void filelist_read_dir(struct FileList* filelist)
BLI_cleanup_dir(G.sce, filelist->dir);
filelist->numfiles = BLI_getdir(filelist->dir, &(filelist->filelist));
- if(!chdir(wdir)) /* fix warning about not checking return value */;
+ if(!chdir(wdir)) {} /* fix warning about not checking return value */
filelist_setfiletypes(filelist, G.have_quicktime);
filelist_filter(filelist);
}
diff --git a/source/blender/editors/space_file/writeimage.c b/source/blender/editors/space_file/writeimage.c
index ade0b7db0ca..d05ed3e992e 100644
--- a/source/blender/editors/space_file/writeimage.c
+++ b/source/blender/editors/space_file/writeimage.c
@@ -50,10 +50,10 @@
#include "file_intern.h"
/* XXX */
-static void error() {}
+static void error(const char *dummy) {}
static void waitcursor(int val) {}
-static void activate_fileselect() {}
-static int saveover() {return 0;}
+static void activate_fileselect(int d1, char *d2, char *d3, void *d4) {}
+static int saveover(const char *dummy) {return 0;}
/* XXX */
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index aa3a0f58fa9..aaae7e156cd 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -101,11 +101,6 @@
#define B_SIMACLONEBROWSE 25
#define B_SIMACLONEDELETE 26
-/* XXX */
-static int simaFaceDraw_Check() {return 0;}
-static int simaUVSel_Check() {return 0;}
-/* XXX */
-
/* proto */
static void image_editvertex_buts(const bContext *C, uiBlock *block);
@@ -203,7 +198,9 @@ static void image_transform_but_attr(SpaceImage *sima, int *imx, int *imy, int *
/* is used for both read and write... */
static void image_editvertex_buts(const bContext *C, uiBlock *block)
{
+ Scene *scene= CTX_data_scene(C);
SpaceImage *sima= CTX_wm_space_image(C);
+ Image *ima= sima->image;
Object *obedit= CTX_data_edit_object(C);
static float ocent[2];
float cent[2]= {0.0, 0.0};
@@ -218,24 +215,24 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block)
em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
for (efa= em->faces.first; efa; efa= efa->next) {
tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
- if (simaFaceDraw_Check(efa, tf)) {
+ if (uvedit_face_visible(scene, ima, efa, tf)) {
- if (simaUVSel_Check(efa, tf, 0)) {
+ if (uvedit_uv_selected(scene, efa, tf, 0)) {
cent[0]+= tf->uv[0][0];
cent[1]+= tf->uv[0][1];
nactive++;
}
- if (simaUVSel_Check(efa, tf, 1)) {
+ if (uvedit_uv_selected(scene, efa, tf, 1)) {
cent[0]+= tf->uv[1][0];
cent[1]+= tf->uv[1][1];
nactive++;
}
- if (simaUVSel_Check(efa, tf, 2)) {
+ if (uvedit_uv_selected(scene, efa, tf, 2)) {
cent[0]+= tf->uv[2][0];
cent[1]+= tf->uv[2][1];
nactive++;
}
- if (efa->v4 && simaUVSel_Check(efa, tf, 3)) {
+ if (efa->v4 && uvedit_uv_selected(scene, efa, tf, 3)) {
cent[0]+= tf->uv[3][0];
cent[1]+= tf->uv[3][1];
nactive++;
@@ -282,20 +279,20 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block)
for (efa= em->faces.first; efa; efa= efa->next) {
tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
- if (simaFaceDraw_Check(efa, tf)) {
- if (simaUVSel_Check(efa, tf, 0)) {
+ if (uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_uv_selected(scene, efa, tf, 0)) {
tf->uv[0][0]+= delta[0];
tf->uv[0][1]+= delta[1];
}
- if (simaUVSel_Check(efa, tf, 1)) {
+ if (uvedit_uv_selected(scene, efa, tf, 1)) {
tf->uv[1][0]+= delta[0];
tf->uv[1][1]+= delta[1];
}
- if (simaUVSel_Check(efa, tf, 2)) {
+ if (uvedit_uv_selected(scene, efa, tf, 2)) {
tf->uv[2][0]+= delta[0];
tf->uv[2][1]+= delta[1];
}
- if (efa->v4 && simaUVSel_Check(efa, tf, 3)) {
+ if (efa->v4 && uvedit_uv_selected(scene, efa, tf, 3)) {
tf->uv[3][0]+= delta[0];
tf->uv[3][1]+= delta[1];
}
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 1ec203ac740..f624fa23541 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -122,7 +122,7 @@
/* ************* XXX **************** */
-static void error() {}
+static void error(const char *dummy, ...) {}
/* ********************************** */
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index de0b048e9d5..7f95c1cb270 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -79,11 +79,11 @@
//static Sequence *_last_seq=0;
//static int _last_seq_init=0;
/* XXX */
-static void error() {}
+static void error(const char *dummy) {}
static void waitcursor(int val) {}
-static void activate_fileselect() {}
-static int pupmenu() {return 0;}
-static int okee() {return 0;}
+static void activate_fileselect(int d1, char *d2, char *d3, void *d4) {}
+static int pupmenu(const char *dummy) {return 0;}
+static int okee(const char *dummy) {return 0;}
/* XXX */
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 1074c3572fc..a49394d3a12 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -64,8 +64,7 @@
/* own include */
#include "sequencer_intern.h"
-static void *find_nearest_marker() {return NULL;}
-static void deselect_markers() {}
+static void *find_nearest_marker(int d1, int d2) {return NULL;}
void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRING BACK */
{
@@ -349,7 +348,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
marker->flag |= SELECT;
}
else {
- deselect_markers(0, 0);
+ /* deselect_markers(0, 0); */ /* XXX, in 2.4x, seq selection used to deselect all, need to re-thnik this for 2.5 */
marker->flag |= SELECT;
}
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 495f240a97a..1414a51c6c9 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -528,7 +528,7 @@ static void do_lasso_select_mesh_uv(short mcords[][2], short moves, short select
} else { /* Vert Sel*/
for (efa= em->faces.first; efa; efa= efa->next) {
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
- if (simaFaceDraw_Check(efa, tf)) {
+ if (uvedit_face_visible(scene, ima, efa, tf)) {
nverts= efa->v4? 4: 3;
for(i=0; i<nverts; i++) {
if ((select) != (simaUVSel_Check(efa, tf, i))) {
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index 8597454fdb5..4b8d5c1df67 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -76,7 +76,7 @@ void undo_editmode_menu(void) // history menu
/* ********************************************************************* */
/* ****** XXX ***** */
-void error() {}
+void error(const char *dummy) {}
/* ****** XXX ***** */
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 74bef43e928..dd5520608f1 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -1515,8 +1515,9 @@ void GPU_buffer_unbind()
else
break;
}
- if( GLStates != 0 )
+ if( GLStates != 0 ) {
DEBUG_VBO( "Some weird OpenGL state is still set. Why?" );
+ }
if( useVBOs )
glBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
}
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c
index 00ea556792e..5b1a8958247 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -24,6 +24,8 @@
/* ****************************************** */
/* Drivers - PyExpression Evaluation */
+#include <Python.h>
+
#include "DNA_anim_types.h"
#include "BLI_listbase.h"
@@ -32,8 +34,6 @@
#include "BKE_fcurve.h"
#include "BKE_global.h"
-#include <Python.h>
-
/* for pydrivers (drivers using one-line Python expressions to express relationships between targets) */
PyObject *bpy_pydriver_Dict = NULL;
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index 142bef7180d..c74bb9d4a55 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -56,10 +56,6 @@
#include "volumetric.h"
#include "volume_precache.h"
-#if defined( _MSC_VER ) && !defined( __cplusplus )
-# define inline __inline
-#endif // defined( _MSC_VER ) && !defined( __cplusplus )
-
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* defined in pipeline.c, is hardcopy of active dynamic allocated Render */
/* only to be used here in this file, it's for speed */
@@ -67,7 +63,7 @@ extern struct Render R;
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* luminance rec. 709 */
-inline float luminance(float* col)
+BM_INLINE float luminance(float* col)
{
return (0.212671f*col[0] + 0.71516f*col[1] + 0.072169f*col[2]);
}