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:
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editface.c6
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c2
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c24
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c9
4 files changed, 21 insertions, 20 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index 9cec034af28..ab62c88deaa 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -98,7 +98,7 @@ void paintface_flush_flags(Object *ob)
}
/* returns 0 if not found, otherwise 1 */
-static int facesel_face_pick(struct bContext *C, Mesh *me, const short mval[2], unsigned int *index, short rect)
+static int facesel_face_pick(struct bContext *C, Mesh *me, const int mval[2], unsigned int *index, short rect)
{
ViewContext vc;
view3d_set_viewcontext(C, &vc);
@@ -327,7 +327,7 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind
MEM_freeN(linkflag);
}
-void paintface_select_linked(bContext *UNUSED(C), Object *ob, short UNUSED(mval[2]), int mode)
+void paintface_select_linked(bContext *UNUSED(C), Object *ob, int UNUSED(mval[2]), int mode)
{
Mesh *me;
unsigned int index=0;
@@ -716,7 +716,7 @@ void seam_mark_clear_tface(Scene *scene, short mode)
}
#endif
-int paintface_mouse_select(struct bContext *C, Object *ob, const short mval[2], int extend)
+int paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], int extend)
{
Mesh *me;
MFace *mface, *msel;
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index 72e9e3b6d9e..d7e59e0a68f 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -199,7 +199,7 @@ static void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcut
EditEdge *nearest=NULL, *eed;
float fac;
int keys = 0, holdnum=0, selectmode, dist;
- short mvalo[2] = {0, 0}, mval[2] = {0, 0};
+ int mvalo[2] = {0, 0}, mval[2] = {0, 0};
short event=0, val, choosing=1, cancel=0, cuthalf = 0, smooth=0;
short hasHidden = 0;
char msg[128];
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index 8cdbe6707a3..bd49fab1de1 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -162,7 +162,7 @@ unsigned int em_solidoffs=0, em_wireoffs=0, em_vertoffs=0; /* set in drawobject.
static char *selbuf= NULL;
/* opengl doesn't support concave... */
-static void draw_triangulated(short mcords[][2], short tot)
+static void draw_triangulated(int mcords[][2], short tot)
{
ListBase lb={NULL, NULL};
DispList *dl;
@@ -256,7 +256,7 @@ void EM_free_backbuf(void)
- grab again and compare
returns 'OK'
*/
-int EM_mask_init_backbuf_border(ViewContext *vc, short mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax)
+int EM_mask_init_backbuf_border(ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax)
{
unsigned int *dr, *drm;
struct ImBuf *buf, *bufmask;
@@ -290,7 +290,7 @@ int EM_mask_init_backbuf_border(ViewContext *vc, short mcords[][2], short tot, s
draw_triangulated(mcords, tot);
glBegin(GL_LINE_LOOP); /* for zero sized masks, lines */
- for(a=0; a<tot; a++) glVertex2s(mcords[a][0], mcords[a][1]);
+ for(a=0; a<tot; a++) glVertex2iv(mcords[a]);
glEnd();
glFinish(); /* to be sure readpixels sees mask */
@@ -358,7 +358,7 @@ int EM_init_backbuf_circle(ViewContext *vc, short xs, short ys, short rads)
static void findnearestvert__doClosest(void *userData, EditVert *eve, int x, int y, int index)
{
- struct { short mval[2], pass, select, strict; int dist, lastIndex, closestIndex; EditVert *closest; } *data = userData;
+ struct { int mval[2]; short pass, select, strict; int dist, lastIndex, closestIndex; EditVert *closest; } *data = userData;
if (data->pass==0) {
if (index<=data->lastIndex)
@@ -426,7 +426,7 @@ EditVert *findnearestvert(ViewContext *vc, int *dist, short sel, short strict)
}
else {
- struct { short mval[2], pass, select, strict; int dist, lastIndex, closestIndex; EditVert *closest; } data;
+ struct { int mval[2]; short pass, select, strict; int dist, lastIndex, closestIndex; EditVert *closest; } data;
static int lastSelectedIndex=0;
static EditVert *lastSelected=NULL;
@@ -549,7 +549,7 @@ EditEdge *findnearestedge(ViewContext *vc, int *dist)
static void findnearestface__getDistance(void *userData, EditFace *efa, int x, int y, int UNUSED(index))
{
- struct { short mval[2]; int dist; EditFace *toFace; } *data = userData;
+ struct { int mval[2]; int dist; EditFace *toFace; } *data = userData;
if (efa==data->toFace) {
int temp = abs(data->mval[0]-x) + abs(data->mval[1]-y);
@@ -560,7 +560,7 @@ static void findnearestface__getDistance(void *userData, EditFace *efa, int x, i
}
static void findnearestface__doClosest(void *userData, EditFace *efa, int x, int y, int index)
{
- struct { short mval[2], pass; int dist, lastIndex, closestIndex; EditFace *closest; } *data = userData;
+ struct { int mval[2]; short pass; int dist, lastIndex, closestIndex; EditFace *closest; } *data = userData;
if (data->pass==0) {
if (index<=data->lastIndex)
@@ -588,7 +588,7 @@ static EditFace *findnearestface(ViewContext *vc, int *dist)
EditFace *efa = BLI_findlink(&vc->em->faces, index-1);
if (efa) {
- struct { short mval[2]; int dist; EditFace *toFace; } data;
+ struct { int mval[2]; int dist; EditFace *toFace; } data;
data.mval[0] = vc->mval[0];
data.mval[1] = vc->mval[1];
@@ -607,7 +607,7 @@ static EditFace *findnearestface(ViewContext *vc, int *dist)
return NULL;
}
else {
- struct { short mval[2], pass; int dist, lastIndex, closestIndex; EditFace *closest; } data;
+ struct { int mval[2]; short pass; int dist, lastIndex, closestIndex; EditFace *closest; } data;
static int lastSelectedIndex=0;
static EditFace *lastSelected=NULL;
@@ -2061,7 +2061,7 @@ void MESH_OT_loop_multi_select(wmOperatorType *ot)
/* ***************** loop select (non modal) ************** */
-static void mouse_mesh_loop(bContext *C, const short mval[2], short extend, short ring)
+static void mouse_mesh_loop(bContext *C, const int mval[2], short extend, short ring)
{
ViewContext vc;
EditMesh *em;
@@ -2149,7 +2149,7 @@ void MESH_OT_loop_select(wmOperatorType *ot)
/* ******************* mesh shortest path select, uses prev-selected edge ****************** */
/* since you want to create paths with multiple selects, it doesn't have extend option */
-static void mouse_mesh_shortest_path(bContext *C, const short mval[2])
+static void mouse_mesh_shortest_path(bContext *C, const int mval[2])
{
ViewContext vc;
EditMesh *em;
@@ -2282,7 +2282,7 @@ void MESH_OT_select_shortest_path(wmOperatorType *ot)
/* here actual select happens */
/* gets called via generic mouse select operator */
-int mouse_mesh(bContext *C, const short mval[2], short extend)
+int mouse_mesh(bContext *C, const int mval[2], short extend)
{
ViewContext vc;
EditVert *eve;
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index a78029da079..11e7d64c667 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -4011,7 +4011,7 @@ useless:
LinkNode *fuv_link;
short event, draw=1;
- short mval[2], mvalo[2];
+ int mval[2], mvalo[2];
char str[128];
float labda = 0.0f;
@@ -4416,7 +4416,7 @@ useless:
percp = -1;
while(draw) {
/* For the % calculation */
- short mval[2];
+ int mval[2];
float rc[2];
float v2[2], v3[2];
EditVert *centerVert, *upVert, *downVert;
@@ -4867,7 +4867,7 @@ void mesh_set_face_flags(EditMesh *em, short mode)
/********************** Rip Operator *************************/
/* helper to find edge for edge_rip */
-static float mesh_rip_edgedist(ARegion *ar, float mat[][4], float *co1, float *co2, const short mval[2])
+static float mesh_rip_edgedist(ARegion *ar, float mat[][4], float *co1, float *co2, const int mval[2])
{
float vec1[3], vec2[3], mvalf[2];
@@ -4910,7 +4910,8 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
EditEdge *eed, *seed= NULL;
EditFace *efa, *sefa= NULL;
float projectMat[4][4], vec[3], dist, mindist;
- short doit= 1, *mval= event->mval;
+ short doit= 1;
+ int *mval= event->mval;
/* select flush... vertices are important */
EM_selectmode_set(em);