Blender Git Loki

Git Commits -> Revision f95d7c9

Revision f95d7c9 by Campbell Barton (master)
November 29, 2011, 10:28 (GMT)
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

Commit Details:

Full Hash: f95d7c9e66cc8ab2aca9cc82c95828288f1e3df0
SVN Revision: 42248
Parent Commit: a507954
Lines Changed: +962, -6

2 Added Paths:

/source/blender/python/mathutils/mathutils_noise.c (+911, -0) (View)
/source/blender/python/mathutils/mathutils_noise.h (+36, -0) (View)

6 Modified Paths:

/source/blender/python/generic/CMakeLists.txt (+0, -2) (Diff)
/source/blender/python/intern/bpy_driver.c (+1, -1) (Diff)
/source/blender/python/intern/bpy_interface.c (+1, -2) (Diff)
/source/blender/python/mathutils/CMakeLists.txt (+2, -0) (Diff)
/source/blender/python/mathutils/mathutils.c (+7, -1) (Diff)
/source/blender/python/mathutils/mathutils.h (+4, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021