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:
authorCampbell Barton <ideasman42@gmail.com>2011-11-29 14:28:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-29 14:28:52 +0400
commitf95d7c9e66cc8ab2aca9cc82c95828288f1e3df0 (patch)
tree6ecb7ef5cc7ddb891a58162819e91350fee5d721 /source/blender/python/mathutils/mathutils_noise.h
parenta50795408425976396cddbe4fdadcebc579bc358 (diff)
patch [#29421] Python Noise Module Updates
from Andrew Hale (trumanblending) Tracker description ******************* The current python noise module included with Blender has yet to be updated to the new Py API. This patch does so, with the following major points: - The noise module has now been moved to a submodule of mathutils, it can be accessed by mathutils.noise. It was moved from it's own module as it will now return mathutils types and also have greater visibility to the user. - All functions which return vectors will now return mathutils.Vector types to be consistent with the rest of the API. Previously (x, y, z) tuples were returned. - A different implementation of random_unit_vector is now used, this allows 2D, 3D and 4D vectors to be returned. Previously only 3D was possible. - Some function names have been changed to remove ambiguities and make naming consistent within the module. noise.vector is now noise.noise_vector and noise.vl_vector is now noise.variable_lacunarity - Doc strings have been updated to be compatible with auto docs. - Code style and internal naming has been changed to match the conventions in other mathutils code. Thanks, Andrew
Diffstat (limited to 'source/blender/python/mathutils/mathutils_noise.h')
-rw-r--r--source/blender/python/mathutils/mathutils_noise.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/source/blender/python/mathutils/mathutils_noise.h b/source/blender/python/mathutils/mathutils_noise.h
new file mode 100644
index 00000000000..6a6527588ef
--- /dev/null
+++ b/source/blender/python/mathutils/mathutils_noise.h
@@ -0,0 +1,36 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/python/mathutils/mathutils_noise.h
+ * \ingroup mathutils
+ */
+
+#ifndef MATHUTILS_NOISE_H
+#define MATHUTILS_NOISE_H
+
+#include "mathutils.h"
+
+PyMODINIT_FUNC PyInit_mathutils_noise(void);
+PyMODINIT_FUNC PyInit_mathutils_noise_types(void);
+PyMODINIT_FUNC PyInit_mathutils_noise_metrics(void);
+
+#endif // MATHUTILS_NOISE_H