ScriptSpot

Forum topic · General Scripting

need help with noise controller (i add it to all objects in one click but parameters wont work)

By piotradamczyk · 2012-07-04

Description

Hi

I copied the noise controller from max script listener and added the lines from maxscript help file, but the script wont modify the noise controller's values, what am i doing wrong???

macroScript Macro3
category:"DragAndDrop"
toolTip:""
(
$.rotation.controller = Noise_rotation ()
)
.seed Integer default: 0
.frequency Float default: 0.005
.fractal Boolean default: true
.roughness Float default: 0.0
.rampin Time default: 0f
.rampout Time default: 0f

Thanks in advance

Comments (2)

Update this...

kimarotta · 2012-07-04

The correct is...


macroScript Macro3
category:"DragAndDrop"
toolTip:""
(

fn configNoise obj =
(

obj.rotation.controller = Noise_rotation ()
o = obj.rotation.controller

o.seed = 0
o.frequency = 0.005
o.fractal = true
o.roughness = 0.0
o.rampin = 0f
o.rampout = 0f
)


for obj in selection do ( configNoise obj )

)

piotradamczyk · 2012-07-05

Thanks a lot. It saved me lots of time.