Things not working in 2.8 Animation Nodes

animation-nodes

(Clockmender) #1

This code does not work inside Animation Nodes:

bpy.context.selected_objects

Same for this:

bpy.context.selected_pose_bones

But they both work in the Python Console. grrrrrrr What a bugger, does anyone know a workaround for getting selected bones?

Workaround for objects is this:

[i for i in bpy.data.objects if i.select_get()]

But I cannot find a workaround for getting selected bones…

Can anyone help here?

Cheers, Clock. :cocktail:

EDIT:

Here is the error message from my terminal

  File "/Users/mac/Library/Application Support/Blender/2.80/scripts/addons/animation_nodes/nodes/zc_audio_midi/midas.py", line 158, in execute
    boneList = bpy.context.selected_pose_bones
AttributeError: 'Context' object has no attribute 'selected_pose_bones'

And this from the Python Console:

>>> bpy.context.selected_pose_bones
[bpy.data.objects['Armature'].pose.bones["Bone"], bpy.data.objects['Armature'].pose.bones["Bone.001"], bpy.data.objects['Armature'].pose.bones["Bone.002"]]

(Clockmender) #2

Never mind, accredit myself.