New python submodule mathutils.interpolate for various mesh interpolation and weighting methods.

This module will contain mirrored functions for calculating and applying
weights for points on a mesh. This includes barycentric and UV weighting
and possibly more advanced global weighting such as harmonic weights.

The naming should follow this scheme:
<type>_{2d,3d}_{calc,apply}

e.g.
poly_2d_calc
poly_2d_apply
uv_3d_calc
...

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D939
This commit is contained in:
2014-12-15 19:45:01 +01:00
parent 3b938f3d7f
commit 658fc3ddbc
4 changed files with 173 additions and 0 deletions

View File

@@ -502,6 +502,7 @@ static struct PyModuleDef M_Mathutils_module_def = {
/* submodules only */
#include "mathutils_geometry.h"
#include "mathutils_interpolate.h"
#ifndef MATH_STANDALONE
# include "mathutils_kdtree.h"
# include "mathutils_noise.h"
@@ -537,6 +538,7 @@ PyMODINIT_FUNC PyInit_mathutils(void)
/* submodule */
PyModule_AddObject(mod, "geometry", (submodule = PyInit_mathutils_geometry()));
PyModule_AddObject(mod, "interpolate", (submodule = PyInit_mathutils_interpolate()));
/* XXX, python doesnt do imports with this usefully yet
* 'from mathutils.geometry import PolyFill'
* ...fails without this. */