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/editmesh_knife.c')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 7ecfb712c18..1dcbf574b44 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -29,7 +29,9 @@
* \ingroup edmesh
*/
-#define _USE_MATH_DEFINES
+#ifdef _MSC_VER
+# define _USE_MATH_DEFINES
+#endif
#include "MEM_guardedalloc.h"
@@ -222,7 +224,7 @@ static void knife_update_header(bContext *C, KnifeTool_OpData *kcd)
static void knife_project_v3(KnifeTool_OpData *kcd, const float co[3], float sco[3])
{
- ED_view3d_project_float_v3(kcd->ar, co, sco, kcd->projmat);
+ ED_view3d_project_float_v3_m4(kcd->ar, co, sco, kcd->projmat);
}
static void knife_pos_data_clear(KnifePosData *kpd)
@@ -1203,7 +1205,7 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
}
knife_project_v3(kcd, p, sp);
- view3d_unproject(mats, view, sp[0], sp[1], 0.0f);
+ ED_view3d_unproject(mats, view, sp[0], sp[1], 0.0f);
mul_m4_v3(kcd->ob->imat, view);
if (kcd->cut_through) {
@@ -1386,7 +1388,7 @@ static void knife_input_ray_cast(KnifeTool_OpData *kcd, const int mval_i[2],
mval[1] = (float)mval_i[1];
/* unproject to find view ray */
- view3d_unproject(&mats, r_origin, mval[0], mval[1], 0.0f);
+ ED_view3d_unproject(&mats, r_origin, mval[0], mval[1], 0.0f);
if (kcd->is_ortho) {
negate_v3_v3(r_ray, kcd->vc.rv3d->viewinv[2]);
@@ -1753,6 +1755,9 @@ static int knife_update_active(KnifeTool_OpData *kcd)
return 1;
}
+#define SCANFILL_CUTS 0
+#if SCANFILL_CUTS
+
#define MARK 4
#define DEL 8
#define VERT_ON_EDGE 16
@@ -1761,9 +1766,6 @@ static int knife_update_active(KnifeTool_OpData *kcd)
#define BOUNDARY 128
#define FACE_NEW 256
-#define SCANFILL_CUTS 0
-#if SCANFILL_CUTS
-
typedef struct facenet_entry {
struct facenet_entry *next, *prev;
KnifeEdge *kfe;