import Blenderimport Blender.Node as bNdef init(): 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) # return a dict of dicts, since we can have a node that is # input only # output only # input and output return {'inputs':{'Turbulence':turb} , 'outputs':{'Colour':colout}}def clouds(texvec, depth, hard, basis, amp, freq): return Noise.turbulence(texvec, depth, hard, basis, amp, freq)def execute(node): node.outputs['col'] = node.inputs['turb'] * clouds(node.texvec, 2, 0, 1, 0.5, 2.0) #or # col = node.inputs['turb'] * clouds(node.texvec, 2, 0, 1, 0.5, 2.0) # return {'Colour':col}#Next line is optional depending on how its coded internally#however this line would allow arbitrary function names, and#probably easier internal coding.bN.Register(init, execute)