Access the Noise Generator

How do you access the noise generator in 2.5+ it was easy in 2.49. I cant seem to find it in the new api, any help would greatly appreciated! Thanks!

import bpy"new_mat")
matref =["new_mat"]"mynoise", type='NOISE')
noiseref =["mynoise"]

matref.texture_slots.add()["new_mat"].texture_slots[0]["new_mat"].texture_slots[0].texture = noiseref 


Ok got it, but how do you access the data, return a list or a single value of (x,y,z) vTurbulance, i’m tring to script a per vertice noise value to an object.

Maybe i should script a dynamic vertex group, with a noise texture applied. Thanks!

how did you do it in 2.49? give some example code

This is an example from 2.49 api.

time = Get(‘curtime’)
ob = Scene.GetCurrent().getCurrentCamera()
ps = (sltime, sltime, sl*time)

To add jitter only when the camera moves, use this next line instead

#ps = (slob.LocX, slob.LocY, slob.LocZ)
rv = Noise.vTurbulence(ps, 3, 0, Noise.NoiseTypes.NEWPERLIN) ## this is what i need
ob.dloc = (sp
rv[0], sprv[1], sprv[2]) ## rv[0] = x
ob.drot = (srrv[0], srrv[1], sr*rv[2])

That’s the data i’m looking for, then i can off set a vertice in the (x,y,z) axes with a scalar factor.

You could add an f-curve, then a noise modifier then you could just poll that f-curve at any time for a noise value.