|
Blender
V2.59
|
#include <Python.h>#include "structseq.h"#include "BLI_blenlib.h"#include "BLI_utildefines.h"#include "DNA_texture_types.h"#include "noise_py_api.h"Go to the source code of this file.
Defines | |
| #define | N 624 |
| #define | M 397 |
| #define | MATRIX_A 0x9908b0dfUL |
| #define | UMASK 0x80000000UL |
| #define | LMASK 0x7fffffffUL |
| #define | MIXBITS(u, v) (((u) & UMASK) | ((v) & LMASK)) |
| #define | TWIST(u, v) ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL)) |
Functions | |
| static void | init_genrand (unsigned long s) |
| static void | next_state (void) |
| static void | setRndSeed (int seed) |
| static float | frand (void) |
| static void | randuvec (float v[3]) |
| static PyObject * | Noise_random (PyObject *UNUSED(self)) |
| static PyObject * | Noise_random_unit_vector (PyObject *UNUSED(self)) |
| static PyObject * | Noise_seed_set (PyObject *UNUSED(self), PyObject *args) |
| static PyObject * | Noise_noise (PyObject *UNUSED(self), PyObject *args) |
| static void | noise_vector (float x, float y, float z, int nb, float v[3]) |
| static PyObject * | Noise_vector (PyObject *UNUSED(self), PyObject *args) |
| static float | turb (float x, float y, float z, int oct, int hard, int nb, float ampscale, float freqscale) |
| static PyObject * | Noise_turbulence (PyObject *UNUSED(self), PyObject *args) |
| static void | vTurb (float x, float y, float z, int oct, int hard, int nb, float ampscale, float freqscale, float v[3]) |
| static PyObject * | Noise_turbulence_vector (PyObject *UNUSED(self), PyObject *args) |
| static PyObject * | Noise_fractal (PyObject *UNUSED(self), PyObject *args) |
| static PyObject * | Noise_multi_fractal (PyObject *UNUSED(self), PyObject *args) |
| static PyObject * | Noise_vl_vector (PyObject *UNUSED(self), PyObject *args) |
| static PyObject * | Noise_hetero_terrain (PyObject *UNUSED(self), PyObject *args) |
| static PyObject * | Noise_hybrid_multi_fractal (PyObject *UNUSED(self), PyObject *args) |
| static PyObject * | Noise_ridged_multi_fractal (PyObject *UNUSED(self), PyObject *args) |
| static PyObject * | Noise_voronoi (PyObject *UNUSED(self), PyObject *args) |
| static PyObject * | Noise_cell (PyObject *UNUSED(self), PyObject *args) |
| static PyObject * | Noise_cell_vector (PyObject *UNUSED(self), PyObject *args) |
| PyDoc_STRVAR (random__doc__,"() No arguments.\n\n\ Returns a random floating point number in the range [0, 1)") | |
| PyDoc_STRVAR (random_unit_vector__doc__,"() No arguments.\n\nReturns a random unit vector (3-float list).") | |
| PyDoc_STRVAR (seed_set__doc__,"(seed value)\n\n\ Initializes random number generator.\n\ if seed is zero, the current time will be used instead.") | |
| PyDoc_STRVAR (noise__doc__,"((x,y,z) tuple, [noisetype])\n\n\ Returns general noise of the optional specified type.\n\ Optional argument noisetype determines the type of noise, STDPERLIN by default, see NoiseTypes.") | |
| PyDoc_STRVAR (noise_vector__doc__,"((x,y,z) tuple, [noisetype])\n\n\ Returns noise vector (3-float list) of the optional specified type.\ Optional argument noisetype determines the type of noise, STDPERLIN by default, see NoiseTypes.") | |
| PyDoc_STRVAR (turbulence__doc__,"((x,y,z) tuple, octaves, hard, [noisebasis], [ampscale], [freqscale])\n\n\ Returns general turbulence value using the optional specified noisebasis function.\n\ octaves (integer) is the number of noise values added.\n\ hard (bool), when false (0) returns 'soft' noise, when true (1) returns 'hard' noise (returned value always positive).\n\ Optional arguments:\n\ noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes.\n\ ampscale sets the amplitude scale value of the noise frequencies added, 0.5 by default.\n\ freqscale sets the frequency scale factor, 2.0 by default.") | |
| PyDoc_STRVAR (turbulence_vector__doc__,"((x,y,z) tuple, octaves, hard, [noisebasis], [ampscale], [freqscale])\n\n\ Returns general turbulence vector (3-float list) using the optional specified noisebasis function.\n\ octaves (integer) is the number of noise values added.\n\ hard (bool), when false (0) returns 'soft' noise, when true (1) returns 'hard' noise (returned vector always positive).\n\ Optional arguments:\n\ noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes.\n\ ampscale sets the amplitude scale value of the noise frequencies added, 0.5 by default.\n\ freqscale sets the frequency scale factor, 2.0 by default.") | |
| PyDoc_STRVAR (fractal__doc__,"((x,y,z) tuple, H, lacunarity, octaves, [noisebasis])\n\n\ Returns Fractal Brownian Motion noise value(fBm).\n\ H is the fractal increment parameter.\n\ lacunarity is the gap between successive frequencies.\n\ octaves is the number of frequencies in the fBm.\n\ Optional argument noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes.") | |
| PyDoc_STRVAR (multi_fractal__doc__,"((x,y,z) tuple, H, lacunarity, octaves, [noisebasis])\n\n\ Returns Multifractal noise value.\n\ H determines the highest fractal dimension.\n\ lacunarity is gap between successive frequencies.\n\ octaves is the number of frequencies in the fBm.\n\ Optional argument noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes.") | |
| PyDoc_STRVAR (vl_vector__doc__,"((x,y,z) tuple, distortion, [noisetype1], [noisetype2])\n\n\ Returns Variable Lacunarity Noise value, a distorted variety of noise.\n\ distortion sets the amount of distortion.\n\ Optional arguments noisetype1 and noisetype2 set the noisetype to distort and the noisetype used for the distortion respectively.\n\ See NoiseTypes, both are STDPERLIN by default.") | |
| PyDoc_STRVAR (hetero_terrain__doc__,"((x,y,z) tuple, H, lacunarity, octaves, offset, [noisebasis])\n\n\ returns Heterogeneous Terrain value\n\ H determines the fractal dimension of the roughest areas.\n\ lacunarity is the gap between successive frequencies.\n\ octaves is the number of frequencies in the fBm.\n\ offset raises the terrain from 'sea level'.\n\ Optional argument noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes.") | |
| PyDoc_STRVAR (hybrid_multi_fractal__doc__,"((x,y,z) tuple, H, lacunarity, octaves, offset, gain, [noisebasis])\n\n\ returns Hybrid Multifractal value.\n\ H determines the fractal dimension of the roughest areas.\n\ lacunarity is the gap between successive frequencies.\n\ octaves is the number of frequencies in the fBm.\n\ offset raises the terrain from 'sea level'.\n\ gain scales the values.\n\ Optional argument noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes.") | |
| PyDoc_STRVAR (ridged_multi_fractal__doc__,"((x,y,z) tuple, H, lacunarity, octaves, offset, gain [noisebasis])\n\n\ returns Ridged Multifractal value.\n\ H determines the fractal dimension of the roughest areas.\n\ lacunarity is the gap between successive frequencies.\n\ octaves is the number of frequencies in the fBm.\n\ offset raises the terrain from 'sea level'.\n\ gain scales the values.\n\ Optional argument noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes.") | |
| PyDoc_STRVAR (voronoi__doc__,"((x,y,z) tuple, distance_metric, [exponent])\n\n\ returns a list, containing a list of distances in order of closest feature,\n\ and a list containing the positions of the four closest features\n\ Optional arguments:\n\ distance_metric: see DistanceMetrics, default is DISTANCE\n\ exponent is only used with MINKOVSKY, default is 2.5.") | |
| PyDoc_STRVAR (cell__doc__,"((x,y,z) tuple)\n\n\ returns cellnoise float value.") | |
| PyDoc_STRVAR (cell_vector__doc__,"((x,y,z) tuple)\n\n\ returns cellnoise vector/point/color (3-float list).") | |
| PyDoc_STRVAR (Noise__doc__,"Blender Noise and Turbulence Module\n\n\ This module can be used to generate noise of various types.\n\ This can be used for terrain generation, to create textures,\n\ make animations more 'animated', object deformation, etc.\n\ As an example, this code segment when scriptlinked to a framechanged event,\n\ will make the camera sway randomly about, by changing parameters this can\n\ look like anything from an earthquake to a very nervous or maybe even drunk cameraman...\n\ (the camera needs an ipo with at least one Loc & Rot key for this to work!):\n\ \n\ \tfrom Blender import Get, Scene, Noise\n\ \n\ \t####################################################\n\ \t# This controls jitter speed\n\ \tsl = 0.025\n\ \t# This controls the amount of position jitter\n\ \tsp = 0.1\n\ \t# This controls the amount of rotation jitter\n\ \tsr = 0.25\n\ \t####################################################\n\ \n\ \ttime = Get('curtime')\n\ \tob = Scene.GetCurrent().getCurrentCamera()\n\ \tps = (sl*time, sl*time, sl*time)\n\ \t# To add jitter only when the camera moves, use this next line instead\n\ \t#ps = (sl*ob.LocX, sl*ob.LocY, sl*ob.LocZ)\n\ \trv = Noise.turbulence_vector(ps, 3, 0, Noise.NoiseTypes.NEWPERLIN)\n\ \tob.dloc = (sp*rv[0], sp*rv[1], sp*rv[2])\n\ \tob.drot = (sr*rv[0], sr*rv[1], sr*rv[2])\n\ \n") | |
| PyObject * | BPyInit_noise (void) |
Variables | |
| static unsigned long | state [N] |
| static int | left = 1 |
| static int | initf = 0 |
| static unsigned long * | next |
| static PyMethodDef | NoiseMethods [] |
| static struct PyModuleDef | noise_module_def |
Definition in file noise_py_api.c.
| #define LMASK 0x7fffffffUL |
Definition at line 125 of file noise_py_api.c.
| #define M 397 |
Definition at line 122 of file noise_py_api.c.
Referenced by __nlFactorize_SUPERLU(), TNT::Cholesky_upper_factorization(), FHT(), fht_convolve(), KDL::Frame::Frame(), KDL::FrameVel::GetFrame(), KDL::Segment::getInertia(), KDL::TwistVel::GetTwist(), TNT::Fortran_Matrix< T >::initialize(), TNT::Matrix< MT_Scalar >::initialize(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), TNT::LU_factor(), TNT::matmult(), TNT::matmultdiag(), TNT::Matrix< MT_Scalar >::Matrix(), mul_v3m3_dq(), TNT::mult_element(), next_state(), nlMatrixAdd(), nlPrintMatrix(), TNT::operator*(), TNT::operator+(), TNT::operator-(), TNT::operator<<(), TNT::Region2D< Array2D >::operator=(), TNT::operator>>(), TNT::QR_factor(), quat_to_eulO(), RE_rayobject_instance_bb(), sCopy_Dense_Matrix(), iTaSC::WSDLSSolver::solve(), TNT::transpose(), IK_QSphericalSegment::UpdateAngle(), and IK_QSwingSegment::UpdateAngle().
| #define MATRIX_A 0x9908b0dfUL |
Definition at line 123 of file noise_py_api.c.
| #define MIXBITS | ( | u, | |
| v | |||
| ) | (((u) & UMASK) | ((v) & LMASK)) |
Definition at line 126 of file noise_py_api.c.
| #define N 624 |
Definition at line 121 of file noise_py_api.c.
Referenced by init_genrand(), and next_state().
| #define TWIST | ( | u, | |
| v | |||
| ) | ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL)) |
Definition at line 127 of file noise_py_api.c.
Referenced by next_state().
| #define UMASK 0x80000000UL |
Definition at line 124 of file noise_py_api.c.
| PyObject* BPyInit_noise | ( | void | ) |
Definition at line 693 of file noise_py_api.c.
References NULL, setRndSeed(), TEX_BLENDER, TEX_CELLNOISE, TEX_CHEBYCHEV, TEX_DISTANCE, TEX_DISTANCE_SQUARED, TEX_MANHATTAN, TEX_MINKOVSKY, TEX_MINKOVSKY_FOUR, TEX_MINKOVSKY_HALF, TEX_NEWPERLIN, TEX_STDPERLIN, TEX_VORONOI_CRACKLE, TEX_VORONOI_F1, TEX_VORONOI_F2, TEX_VORONOI_F2F1, TEX_VORONOI_F3, and TEX_VORONOI_F4.
| static float frand | ( | void | ) | [static] |
Definition at line 186 of file noise_py_api.c.
References left, next, and next_state().
Referenced by Noise_random(), and randuvec().
| static void init_genrand | ( | unsigned long | s | ) | [static] |
Definition at line 135 of file noise_py_api.c.
References initf, left, N, and state.
Referenced by next_state(), and setRndSeed().
| static void next_state | ( | void | ) | [static] |
| static PyObject* Noise_cell | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 455 of file noise_py_api.c.
References cellNoise(), and NULL.
| static PyObject* Noise_cell_vector | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 466 of file noise_py_api.c.
References cellNoiseV(), and NULL.
| static PyObject* Noise_fractal | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 369 of file noise_py_api.c.
| static PyObject* Noise_hetero_terrain | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 403 of file noise_py_api.c.
References mg_HeteroTerrain(), and NULL.
| static PyObject* Noise_hybrid_multi_fractal | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 415 of file noise_py_api.c.
References mg_HybridMultiFractal(), and NULL.
| static PyObject* Noise_multi_fractal | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 380 of file noise_py_api.c.
References mg_MultiFractal(), and NULL.
| static PyObject* Noise_noise | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 250 of file noise_py_api.c.
References BLI_gNoise(), and NULL.
| static PyObject* Noise_random | ( | PyObject * | UNUSEDself | ) | [static] |
Definition at line 221 of file noise_py_api.c.
References frand().
| static PyObject* Noise_random_unit_vector | ( | PyObject * | UNUSEDself | ) | [static] |
Definition at line 226 of file noise_py_api.c.
References randuvec().
| static PyObject* Noise_ridged_multi_fractal | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 427 of file noise_py_api.c.
References mg_RidgedMultiFractal(), and NULL.
| static PyObject* Noise_seed_set | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 237 of file noise_py_api.c.
References NULL, and setRndSeed().
| static PyObject* Noise_turbulence | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 310 of file noise_py_api.c.
| static PyObject* Noise_turbulence_vector | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 354 of file noise_py_api.c.
| static void noise_vector | ( | float | x, |
| float | y, | ||
| float | z, | ||
| int | nb, | ||
| float | v[3] | ||
| ) | [static] |
Definition at line 264 of file noise_py_api.c.
References BLI_gNoise().
Referenced by Noise_vector(), and vTurb().
| static PyObject* Noise_vector | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 274 of file noise_py_api.c.
References noise_vector(), and NULL.
| static PyObject* Noise_vl_vector | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 392 of file noise_py_api.c.
References simple_enum_gen::d, mg_VLNoise(), and NULL.
| static PyObject* Noise_voronoi | ( | PyObject * | UNUSEDself, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 438 of file noise_py_api.c.
| PyDoc_STRVAR | ( | random__doc__ | , |
| "() No arguments.\n\n\Returns a random floating point number in the range [ | 0, | ||
| 1 | |||
| ) |
| PyDoc_STRVAR | ( | random_unit_vector__doc__ | , |
| "() No arguments.\n\nReturns a random unit vector (3-float list)." | |||
| ) |
| PyDoc_STRVAR | ( | seed_set__doc__ | , |
| "(seed value)\n\n\Initializes random number generator.\n\if seed is | zero, | ||
| the current time will be used instead." | |||
| ) |
| PyDoc_STRVAR | ( | noise__doc__ | , |
| "((x,y,z) tuple, [noisetype])\n\n\Returns general noise of the optional specified type.\n\Optional argument noisetype determines the type of | noise, | ||
| STDPERLIN by | default, | ||
| see NoiseTypes." | |||
| ) |
| PyDoc_STRVAR | ( | noise_vector__doc__ | , |
| "((x,y,z) tuple, [noisetype])\n\n\Returns noise vector (3-float list) of the optional specified type.\Optional argument noisetype determines the type of | noise, | ||
| STDPERLIN by | default, | ||
| see NoiseTypes." | |||
| ) |
| PyDoc_STRVAR | ( | turbulence__doc__ | , |
| " | (x,y,z) tuple, octaves, hard,[noisebasis], [ampscale], [freqscale])\n\n\Returns general turbulence value using the optional specified noisebasis function.\n\octaves (integer) is the number of noise values added.\n\hard (bool, | ||
| when false(0) returns 'soft' | noise, | ||
| when true(1) returns 'hard'noise(returned value always positive).\n\Optional arguments:\n\noisebasis determines the type of noise used for the | turbulence, | ||
| STDPERLIN by | default, | ||
| see NoiseTypes.\n\ampscale sets the amplitude scale value of the noise frequencies | added, | ||
| 0.5 by default.\n\freqscale sets the frequency scale | factor, | ||
| 2.0 by default." | |||
| ) |
| PyDoc_STRVAR | ( | turbulence_vector__doc__ | , |
| " | (x,y,z) tuple, octaves, hard,[noisebasis], [ampscale], [freqscale])\n\n\Returns general turbulence vector (3-float list) using the optional specified noisebasis function.\n\octaves (integer) is the number of noise values added.\n\hard (bool, | ||
| when false(0) returns 'soft' | noise, | ||
| when true(1) returns 'hard'noise(returned vector always positive).\n\Optional arguments:\n\noisebasis determines the type of noise used for the | turbulence, | ||
| STDPERLIN by | default, | ||
| see NoiseTypes.\n\ampscale sets the amplitude scale value of the noise frequencies | added, | ||
| 0.5 by default.\n\freqscale sets the frequency scale | factor, | ||
| 2.0 by default." | |||
| ) |
| PyDoc_STRVAR | ( | fractal__doc__ | , |
| "((x,y,z) tuple, H, lacunarity, octaves, [noisebasis])\n\n\Returns Fractal Brownian Motion noise value(fBm).\n\H is the fractal increment parameter.\n\lacunarity is the gap between successive frequencies.\n\octaves is the number of frequencies in the fBm.\n\Optional argument noisebasis determines the type of noise used for the | turbulence, | ||
| STDPERLIN by | default, | ||
| see NoiseTypes." | |||
| ) |
| PyDoc_STRVAR | ( | multi_fractal__doc__ | , |
| "((x,y,z) tuple, H, lacunarity, octaves, [noisebasis])\n\n\Returns Multifractal noise value.\n\H determines the highest fractal dimension.\n\lacunarity is gap between successive frequencies.\n\octaves is the number of frequencies in the fBm.\n\Optional argument noisebasis determines the type of noise used for the | turbulence, | ||
| STDPERLIN by | default, | ||
| see NoiseTypes." | |||
| ) |
| PyDoc_STRVAR | ( | vl_vector__doc__ | , |
| "((x,y,z) tuple, distortion, [noisetype1], [noisetype2])\n\n\Returns Variable Lacunarity Noise | value, | ||
| a distorted variety of noise.\n\distortion sets the amount of distortion.\n\Optional arguments noisetype1 and noisetype2 set the noisetype to distort and the noisetype used for the distortion respectively.\n\See | NoiseTypes, | ||
| both are STDPERLIN by default." | |||
| ) |
| PyDoc_STRVAR | ( | hetero_terrain__doc__ | , |
| "((x,y,z) tuple, H, lacunarity, octaves, offset, [noisebasis])\n\n\returns Heterogeneous Terrain value\n\H determines the fractal dimension of the roughest areas.\n\lacunarity is the gap between successive frequencies.\n\octaves is the number of frequencies in the fBm.\n\offset raises the terrain from 'sea level'.\n\Optional argument noisebasis determines the type of noise used for the | turbulence, | ||
| STDPERLIN by | default, | ||
| see NoiseTypes." | |||
| ) |
| PyDoc_STRVAR | ( | hybrid_multi_fractal__doc__ | , |
| "((x,y,z) tuple, H, lacunarity, octaves, offset, gain, [noisebasis])\n\n\returns Hybrid Multifractal value.\n\H determines the fractal dimension of the roughest areas.\n\lacunarity is the gap between successive frequencies.\n\octaves is the number of frequencies in the fBm.\n\offset raises the terrain from 'sea level'.\n\gain scales the values.\n\Optional argument noisebasis determines the type of noise used for the | turbulence, | ||
| STDPERLIN by | default, | ||
| see NoiseTypes." | |||
| ) |
| PyDoc_STRVAR | ( | ridged_multi_fractal__doc__ | , |
| "((x,y,z) tuple, H, lacunarity, octaves, offset, gain [noisebasis])\n\n\returns Ridged Multifractal value.\n\H determines the fractal dimension of the roughest areas.\n\lacunarity is the gap between successive frequencies.\n\octaves is the number of frequencies in the fBm.\n\offset raises the terrain from 'sea level'.\n\gain scales the values.\n\Optional argument noisebasis determines the type of noise used for the | turbulence, | ||
| STDPERLIN by | default, | ||
| see NoiseTypes." | |||
| ) |
| PyDoc_STRVAR | ( | voronoi__doc__ | , |
| "((x,y,z) tuple, distance_metric, [exponent])\n\n\returns a | list, | ||
| containing a list of distances in order of closest | feature, | ||
| \n\and a list containing the positions of the four closest features\n\Optional arguments:\n\distance_metric:see | DistanceMetrics, | ||
| default is DISTANCE\n\exponent is only used with | MINKOVSKY, | ||
| default is 2.5." | |||
| ) |
| PyDoc_STRVAR | ( | cell__doc__ | , |
| "((x,y,z) tuple)\n\n\returns cellnoise float value." | |||
| ) |
| PyDoc_STRVAR | ( | cell_vector__doc__ | , |
| "((x,y,z) tuple)\n\n\returns cellnoise vector/point/color (3-float list)." | |||
| ) |
| PyDoc_STRVAR | ( | Noise__doc__ | , |
| "Blender Noise and Turbulence Module\n\n\This module can be used to generate noise of various types.\n\This can be used for terrain | generation, | ||
| to create | textures, | ||
| \n\make animations more 'animated' | , | ||
| object | deformation, | ||
| etc.\n\As an | example, | ||
| this code segment when scriptlinked to a framechanged | event, | ||
| \n\will make the camera sway randomly | about, | ||
| by changing parameters this can\n\look like anything from an earthquake to a very nervous or maybe even drunk cameraman...\n\(the camera needs an ipo with at least one Loc &Rot key for this to work!):\n\\n\\tfrom Blender import | Get, | ||
| Scene | , | ||
| Noise\n\\n\\t####################################################\n\\t#This controls jitter speed\n\\ | tsl = 0.025\n\\t# This controls the amount of position jitter\n\\tsp = 0.1\n\\t# This controls the amount of rotation jitter\n\\tsr = 0.25\n\\t####################################################\n\\n\\ttime = Get('curtime')\n\\tob = Scene.GetCurrent().getCurrentCamera()\n\\tps = (sl*time, sl*time, sl*time)\n\\t# To add jitter only when the camera moves |
||
| ) |
| static void randuvec | ( | float | v[3] | ) | [static] |
Definition at line 206 of file noise_py_api.c.
References cos(), frand(), sin(), and sqrt().
Referenced by Noise_random_unit_vector().
| static void setRndSeed | ( | int | seed | ) | [static] |
Definition at line 177 of file noise_py_api.c.
References init_genrand(), and NULL.
Referenced by BPyInit_noise(), and Noise_seed_set().
| static float turb | ( | float | x, |
| float | y, | ||
| float | z, | ||
| int | oct, | ||
| int | hard, | ||
| int | nb, | ||
| float | ampscale, | ||
| float | freqscale | ||
| ) | [static] |
Definition at line 288 of file noise_py_api.c.
References BLI_gNoise(), fabs(), and i.
Referenced by InitSunSky(), magic(), Noise_turbulence(), and pointdensitytex().
| static void vTurb | ( | float | x, |
| float | y, | ||
| float | z, | ||
| int | oct, | ||
| int | hard, | ||
| int | nb, | ||
| float | ampscale, | ||
| float | freqscale, | ||
| float | v[3] | ||
| ) | [static] |
Definition at line 325 of file noise_py_api.c.
References fabs(), i, and noise_vector().
Referenced by Noise_turbulence_vector().
int initf = 0 [static] |
Definition at line 131 of file noise_py_api.c.
Referenced by init_genrand(), and next_state().
int left = 1 [static] |
Definition at line 130 of file noise_py_api.c.
Referenced by FLUID_3D::addVorticity(), GPC_RenderTools::applyTransform(), KX_BlenderRenderTools::applyTransform(), BLI_uniquename_cb(), build_skip_links(), check_for_dupid(), do_colorband(), fill_quad_double_op(), fill_quad_single(), fill_quad_singlevert(), SG_Tree::Find(), frand(), KX_BlenderCanvas::GetMouseX(), GHOST_WindowCarbon::GHOST_WindowCarbon(), GHOST_WindowWin32::GHOST_WindowWin32(), GHOST_WindowX11::GHOST_WindowX11(), ImageRender::ImageRender(), init_genrand(), isb_bsp_split(), isb_bsp_split_init(), kdtree_balance(), SG_TreeFactory::MakeTreeDown(), minDx(), next_state(), orthographic_m4(), perspective_m4(), query_qual(), GPC_RenderTools::RayHit(), KX_BlenderRenderTools::RayHit(), sb_cf_threads_run(), sb_sfesf_threads_run(), seq_single_fix(), SeqTransInfo(), SG_Tree::SetLeft(), FLUID_3D::setObstacleBoundaries(), FLUID_3D::setObstaclePressure(), KX_Camera::SetViewport(), StereoProjection(), txt_split_curline(), ui_block_position(), KX_TrackToActuator::Update(), View(), and wm_set_apple_prefsize().
unsigned long* next [static] |
Definition at line 132 of file noise_py_api.c.
Referenced by _ehash_free(), _ehash_insert(), iTaSC::Cache::addCacheItem(), alfa_bezpart(), ANIM_keyingset_infos_exit(), animdata_filter_nla(), animdata_filter_remove_duplis(), animdata_filter_remove_invalid(), antialias_tagbuf(), armature_rebuild_pose(), armature_select_linked_invoke(), b_bone_spline_setup(), BLI_freelist(), BLI_freelistN(), BLI_linklist_free(), BLI_linklist_reverse(), BLI_sortlist(), blo_end_image_pointer_map(), BME_bevel_poly(), BME_JFKE(), BME_KF(), BME_loop_find_loop(), BME_MF(), BME_SFME(), calc_keyHandles(), calchandles_fcurve(), calchandlesNurb(), clean_fcurve(), clean_nonmanifold(), iTaSC::CacheChannel::clear(), btDbvtBroadphase::collide(), convert_to_triface(), count_bridge_verts(), curve_rename_fcurves(), cut_links_exec(), delete_exec(), delete_metaelems_exec(), deleteflagNurb(), direct_link_object(), draw_depth(), draw_markers(), btIDebugDraw::drawArc(), editmesh_get_vertex_cos(), elbeemSimplifyChannelFloat(), elbeemSimplifyChannelVec3(), EM_make_uv_vert_map(), gjkepa2_impl::GJK::Evaluate(), extract_proxylocal_constraints(), GHOST_TimerManager::fireTimer(), frand(), free_edgelist(), free_facelist(), free_render_qmcsampler(), free_vertlist(), freeMetaElemlist(), freeNurblist(), freeSketch(), MT_Matrix3x3::getRotation(), GPU_material_free(), GPU_nodes_extract_dynamic_inputs(), gpu_nodes_prune(), IDP_GroupIterNext(), IMB_metadata_free(), keyframe_jump_exec(), lib_link_scene(), make_uv_vert_map(), multiresbake_freejob(), next_state(), GHOST_TimerManager::nextFireTime(), nlaedit_duplicate_exec(), nlaedit_split_exec(), node_delete_exec(), node_delete_reconnect(), node_delete_reconnect_exec(), node_group_socket_move_down_exec(), node_rem_socket(), nodeRemSocketLinks(), nodeUnlinkNode(), ntreeFreeTree(), ntreeInitTypes(), phash_insert(), pose_grab_with_ik_clear(), pose_ik_clear_exec(), pose_select_connected_invoke(), poselib_preview_get_next(), GHOST_SystemSDL::processEvents(), GHOST_SystemWin32::processEvents(), GHOST_SystemCarbon::processEvents(), GHOST_SystemX11::processEvents(), pushdown(), rearrange_island_down(), REEB_freeGraph(), remove_dynamic_typeinfos(), remove_useless(), rna_freelistN(), rna_idproperty_ui(), select_adjacent_cp(), selmap_build_bezier_less(), selmap_build_bezier_more(), sequencer_meta_make_exec(), GHOST_TimerTask::setNext(), btSimpleBroadphaseProxy::SetNextFree(), btAxisSweep3Internal< BP_FP_INT_TYPE >::Handle::SetNextFree(), sk_deleteSelectedStrokes(), sk_straightenStroke(), solveJoints(), sort_shape_fix(), split_bridge_verts(), ss_sync_from_uv(), txt_clear_marker_region(), txt_clear_markers(), txt_find_marker_region(), ui_block_do_align_but(), ui_layout_free(), uiBlockFlipOrder(), undo_clean_stack(), vgroup_move_exec(), view3d_draw_transp(), view3d_draw_xray(), view3d_draw_xraytransp(), weight_paint_sample_enum_itemf(), and wm_event_do_notifiers().
struct PyModuleDef noise_module_def [static] |
{
PyModuleDef_HEAD_INIT,
"noise",
Noise__doc__,
0,
NoiseMethods,
NULL,
NULL,
NULL,
NULL,
}
Definition at line 681 of file noise_py_api.c.
PyMethodDef NoiseMethods[] [static] |
{
{"seed_set", (PyCFunction) Noise_seed_set, METH_VARARGS, seed_set__doc__},
{"random", (PyCFunction) Noise_random, METH_NOARGS, random__doc__},
{"random_unit_vector", (PyCFunction) Noise_random_unit_vector, METH_NOARGS, random_unit_vector__doc__},
{"noise", (PyCFunction) Noise_noise, METH_VARARGS, noise__doc__},
{"vector", (PyCFunction) Noise_vector, METH_VARARGS, noise_vector__doc__},
{"turbulence", (PyCFunction) Noise_turbulence, METH_VARARGS, turbulence__doc__},
{"turbulence_vector", (PyCFunction) Noise_turbulence_vector, METH_VARARGS, turbulence_vector__doc__},
{"fractal", (PyCFunction) Noise_fractal, METH_VARARGS, fractal__doc__},
{"multi_fractal", (PyCFunction) Noise_multi_fractal, METH_VARARGS, multi_fractal__doc__},
{"vl_vector", (PyCFunction) Noise_vl_vector, METH_VARARGS, vl_vector__doc__},
{"hetero_terrain", (PyCFunction) Noise_hetero_terrain, METH_VARARGS, hetero_terrain__doc__},
{"hybrid_multi_fractal", (PyCFunction) Noise_hybrid_multi_fractal, METH_VARARGS, hybrid_multi_fractal__doc__},
{"ridged_multi_fractal", (PyCFunction) Noise_ridged_multi_fractal, METH_VARARGS, ridged_multi_fractal__doc__},
{"voronoi", (PyCFunction) Noise_voronoi, METH_VARARGS, voronoi__doc__},
{"cell", (PyCFunction) Noise_cell, METH_VARARGS, cell__doc__},
{"cell_vector", (PyCFunction) Noise_cell_vector, METH_VARARGS, cell_vector__doc__},
{NULL, NULL, 0, NULL}
}
Definition at line 659 of file noise_py_api.c.
unsigned long state[N] [static] |
Definition at line 129 of file noise_py_api.c.
Referenced by applyModifier(), boid_brain(), boid_copy_settings(), boid_free_settings(), boid_get_current_state(), boid_new_state(), boids_precalc_rules(), BOP_intersectionBoolOp(), build_dag_object(), button_activate_state(), direct_link_particlesettings(), AUD_JackDevice::doesPlayback(), draw_controller_header(), draw_new_particle_system(), explodeMesh(), get_boid_state(), get_effector_data(), GHOST_WindowWin32::getClientBounds(), GHOST_WindowX11::getState(), GHOST_WindowCarbon::getState(), GHOST_WindowWin32::getState(), ghost_event_proc(), GHOST_WindowX11::GHOST_WindowX11(), gpencil_frame_addnew(), init_genrand(), lib_link_particlesettings(), GPC_RenderTools::MotionBlur(), KX_BlenderRenderTools::MotionBlur(), new_particle_duplilist(), next_state(), panel_activate_state(), pointdensity_cache_psys(), precalc_guides(), GHOST_SystemWin32::processKeyEvent(), psys_prepare_physics(), rekey_particle(), rekey_particle_to_time(), render_new_particle_system(), rule_add_exec(), rule_del_exec(), rule_move_down_exec(), rule_move_up_exec(), SCA_IController::SetState(), SCA_IObject::SetState(), GPG_Application::startEmbeddedWindow(), state_add_exec(), state_del_exec(), state_move_down_exec(), state_move_up_exec(), subdivide_particle(), ui_draw_but(), UI_view2d_scrollers_draw(), unlink_object(), wm_window_fullscreen_toggle_exec(), and write_particlesettings().