mabanimator

1 answer · asked · Lesson: Adding Bone Visibility Controls · Course: Scripting a Custom Rig UI Add-on

Is it possible to make a checkbox for a pose bone or a constraint?

Is it possible to make a checkbox for a pose bone or a constraint?
  • author
    Yes, the simple way is to just use a boolean property, it should show up as a checkbox automatically. Sadly you can't use ID Props (the custom properties) to define a boolean, so if it isn't a built-in boolean, you have to add it to the type, e.g.: bpy.types.PoseBone.myprop = bpy.props.BoolProperty(default=True) and then later expose that property in the UI. This has the effect of adding myprop to every posebone, not just one - and can only be done via python.