How do I tweak the scale value in an FModifierNoise.scale box. The tooltip helpfully gives “bpy.data.objects(“Cube”)…scale”. WTH does the “…” stand for? Thanks in advance.
bpy.data.actions['CubeAction'].fcurves[0].modifiers[0].scale
Thanks Ko, but that’s not it. What you offer scales the entire action. I only want to scale the noise modifier scale setting. Below is the complete tooltip:
Amplitude of the noise - the amount that it modifies the underlying curve
Python: FModifierNoise.scale
bpy.data.objects[“Cube”] … scale
Do you (or anyone) know what the “…” refers to? It’s all I need and can’t understand why it’s not there.
bump, anyone?
e.g. like this to set the first found noise fmodifier of the current object to scale=5:
import bpy
ob = bpy.context.object
if ob.animation_data is not None and ob.animation_data.action is not None:
action = ob.animation_data.action
for fcu in action.fcurves:
for mod in fcu.modifiers:
if mod.type == 'NOISE':
mod.scale = 5
break
Thanks CoDEmanX, fixed