All pastes #220525 Raw Edit

jesterKing

public python v1 · immutable
#220525 ·published 2006-10-25 06:38 UTC
rendered paste body
import Blenderimport Blender.Nodeimport mathfrom Blender import NoisebN = Blender.Nodetry:    texvec = node.tex_coord        def clouds(texvec, depth, hard, basis, amp, freq):          return Noise.turbulence(texvec, depth, hard, basis, amp, freq)        col = node.inputs['turb'] * clouds(texvec, 2, 0, 1, 0.5, 2.0)        node.outputs['color'] = (col,col,col, 1.0)except bN.NodeUninitialised:    colout = (bN.RGBA, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)    turb = (bN.VALUE, 0.25, 1.0, 1.0, 1.0,  0.0, 10.0)        node.output_def={'color':colout}    node.input_def = {'turb':turb}