Merge branch 'master' into blender2.8

This commit is contained in:
2018-06-17 11:57:49 +02:00
14 changed files with 24 additions and 19 deletions

View File

@@ -1403,7 +1403,7 @@ static PyObject *bpy_bmvert_copy_from_vert_interp(BPy_BMVert *self, PyObject *ar
return NULL;
}
BM_data_interp_from_verts(bm, vert_array[0], vert_array[1], self->v, CLAMPIS(fac, 0.0f, 1.0f));
BM_data_interp_from_verts(bm, vert_array[0], vert_array[1], self->v, clamp_f(fac, 0.0f, 1.0f));
PyMem_FREE(vert_array);
Py_RETURN_NONE;

View File

@@ -1127,7 +1127,7 @@ int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObj
ret = -1;
}
else {
*(float *)value = CLAMPIS(tmp_val, 0.0f, 1.0f);
*(float *)value = clamp_f(tmp_val, 0.0f, 1.0f);
}
break;
}
@@ -1139,7 +1139,7 @@ int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObj
ret = -1;
}
else {
*(float *)value = CLAMPIS(tmp_val, 0.0f, 1.0f);
*(float *)value = clamp_f(tmp_val, 0.0f, 1.0f);
}
break;
}

View File

@@ -38,6 +38,7 @@
#include "DNA_meshdata_types.h"
#include "BLI_utildefines.h"
#include "BLI_math_base.h"
#include "BLI_math_vector.h"
#include "BKE_deform.h"
@@ -465,7 +466,7 @@ static int bpy_bmdeformvert_ass_subscript(BPy_BMDeformVert *self, PyObject *key,
return -1;
}
dw->weight = CLAMPIS(f, 0.0f, 1.0f);
dw->weight = clamp_f(f, 0.0f, 1.0f);
}
}
else {

View File

@@ -33,6 +33,7 @@
#include <Python.h>
#include "BLI_utildefines.h"
#include "BLI_math_base.h"
#include "MEM_guardedalloc.h"
@@ -159,7 +160,7 @@ static PyObject *bpy_bm_utils_vert_collapse_faces(PyObject *UNUSED(self), PyObje
bm = py_edge->bm;
e_new = BM_vert_collapse_faces(bm, py_edge->e, py_vert->v, CLAMPIS(fac, 0.0f, 1.0f), true, do_join_faces, true);
e_new = BM_vert_collapse_faces(bm, py_edge->e, py_vert->v, clamp_f(fac, 0.0f, 1.0f), true, do_join_faces, true);
if (e_new) {
return BPy_BMEdge_CreatePyObject(bm, e_new);
@@ -365,7 +366,7 @@ static PyObject *bpy_bm_utils_edge_split(PyObject *UNUSED(self), PyObject *args)
bm = py_edge->bm;
v_new = BM_edge_split(bm, py_edge->e, py_vert->v, &e_new, CLAMPIS(fac, 0.0f, 1.0f));
v_new = BM_edge_split(bm, py_edge->e, py_vert->v, &e_new, clamp_f(fac, 0.0f, 1.0f));
if (v_new && e_new) {
PyObject *ret = PyTuple_New(2);