I am having trouble with syntax and could really use some help.
I have a simple bit of code that replaces all selected bones with a custom shape. This works great. (go to pose mode, select the bones to change, and run the script) You have to set the bone_object to be the name of the custom bone you wish to use.
import bpy bone_object = bpy.data.objects["gzmo_custom"] for ob in bpy.context.selected_pose_bones: #ob.show_wire = True ob.custom_shape = bone_object
Now I need to set the bone property “show_wire” to True.
In the python console, I can type “bpy.context.object.data.bones.active.show_wire = True” to do this, but in the script it is not as simple as adding “ob.show_wire = True”
I see the difference is that show_wire uses bpy.object.data.bones, while custom_shape uses bpy.object.pose.bones, but I don’t know what to do with this info.