I’m trying to make the “Monstercat style audio visualizer” as in this video: https://www.youtube.com/watch?v=JDaSk2mX7HU
Strangely enough, I’ve gotten this to work before on my old Windows 7 PC and Blender 2.71, but apparently this time when I run this code on Windows 10 and Blender 2.72:
import bpy
for i in range(0, 64):
bpy.ops.mesh.primitive_plane_add(location = ((i + (i*0.5)), 0, 0))
bpy.context.scene.cursor_location = bpy.context.active_object.location
bpy.context.scene.cursor_location.y -= 1
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
bpy.context.active_object.scale.x = 0.5
bpy.context.active_object.scale.y = 20
bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
bpy.ops.anim.keyframe_insert_menu(type='Scaling')
bpy.context.active_object.animation_data.action.fcurves[0].lock = True
bpy.context.active_object.animation_data.action.fcurves[2].lock = True
bpy.context.area.type = 'GRAPH_EDITOR'
l = i**2 + 20
h = (i+1)**2 + 20
print(str(i) + str(l) + str(h))
bpy.ops.graph.sound_bake(filepath=r'D:\Google Drive\Music\Nightcore and Nightstep\Born (Vocal Mix) [Nightcore Mix].mp3', low = (l), high = (h))
bpy.context.active_object.animation_data.action.fcurves(1).lock = True
I get this error:
Traceback (most recent call last):
File "D:\Google Drive\AnimationRender.blend\Text", line 27, in <module>
TypeError: 'bpy_prop_collection' is not callable
Error: Python script fail, look in the console for now...
How can I fix this so I can move on with my project?