I have an armature with multiple bones and a different object connected to each bone enter image description here

when I hide my bone I want the object that is connected to it to hide as well

How do I achieve this? maybe via driver?

  • $\begingroup$ Is that for animation? $\endgroup$
    – Crantisz
    Commented Jun 22, 2022 at 9:37
  • $\begingroup$ You can't except maybe with a script $\endgroup$
    – moonboots
    Commented Jun 22, 2022 at 9:52
  • $\begingroup$ you could do it with a driver, but then you have to adapt every driver manually...so really tedious $\endgroup$
    – Chris
    Commented Jun 22, 2022 at 10:17
  • $\begingroup$ @Crantisz Yes it's for animation $\endgroup$
    – cak3_lover
    Commented Jun 22, 2022 at 10:35
  • $\begingroup$ @Chris all I want is the object to hide when bone hides, is that possible with a driver? $\endgroup$
    – cak3_lover
    Commented Jun 22, 2022 at 10:35

3 Answers 3


yes you can, but it works "not fine":

enter image description here

right click on your bones "TV" -> copy as new driver

then right click on your objects "TV" and click "paste driver".

Then it "kind of" works.

The disadvantage: if you are in pose mode and press H you have to change to object/edit mode so that the object hides too....

To make it work in rendering as well, copy paste the driver to the object camera Icon.

  • $\begingroup$ does it work for render viewport animation? $\endgroup$
    – cak3_lover
    Commented Jun 22, 2022 at 10:48
  • $\begingroup$ yes, if you change object/edit mode before rendering...as i said, it is pretty weird. I honestly don't know whether it is a bug...for me it looks like one. $\endgroup$
    – Chris
    Commented Jun 22, 2022 at 10:49
  • $\begingroup$ I did as you did but when I hide the bone the object does not hide with it $\endgroup$
    – cak3_lover
    Commented Jun 22, 2022 at 10:52
  • 1
    $\begingroup$ aah you have to switch it like 2 time, yea it's weird but as long as it works in rendering it should be fine $\endgroup$
    – cak3_lover
    Commented Jun 22, 2022 at 10:54
  • 1
    $\begingroup$ ah ha! I found a way to make it work in rendering as well! instead of copy pasting from bone TV icon copy paste the driver to the object camera Icon, add that to your answer and I'll mark it as solved $\endgroup$
    – cak3_lover
    Commented Jun 22, 2022 at 11:03

Good to know the more simple answer works, but I also wrote a custom operator to accomplish this task, It works in pose and edit_armature mode, but does not yet have an "unhide" method that works in reverse. I will leave this to you to reverse engineer how to accomplish.

It only works if the object is parented to the bone via Parent> Bone not Parent > With Automatic Weights or any of the other ones, but I figure you know this.

You can just run the script in the text editor, call it from the search menu and then set a hotkey for it there.

import bpy

class ToggleHiddenObjectBone(bpy.types.Operator):
    bl_idname = "object.toggle_hide_bone_object"
    bl_label = "Toggle Hide on Parented Bones and Objects"
    bl_options = {"REGISTER", "UNDO"}

    def poll(cls, context):
        return context.active_bone is not None and context.mode in {"POSE", "EDIT_ARMATURE"}
    def invoke(self, context, event):
        self.mode = context.mode
        self.parent_bones = dict(zip(
            [obj.parent_bone for obj in bpy.data.objects],
            [obj.name for obj in bpy.data.objects],
        self.bone = context.active_bone
        self.armature = [
            arm for arm in bpy.data.armatures[:] 
            if self.bone.basename in 
            [bone.basename for bone in arm.bones[:]
            self.obj_name = self.parent_bones[self.bone.name]
        except KeyError:
            self.report({"INFO"}, "Bone not found in object parent bones, make sure you set 'Parent > Bone'")
            return {"CANCELLED"}
        if not self.obj_name:
            self.report({"INFO"}, "Active bone has no child object.")
            return {"CANCELLED"}
            return self.execute(context)
    def execute(self, context):
        obj = bpy.data.objects[self.obj_name]
        if self.mode == "POSE":
        context.view_layer.objects.active = obj
        context.view_layer.objects.active = bpy.data.objects[self.armature.name]
        except TypeError:
        return {'FINISHED'}

# Register and add to the "object" menu (required to also use F3 search "Simple Object Operator" for quick access).
def register():
def unregister():

if __name__ == "__main__":


Using this answer

you can achieve the same process via scripting, just in case you want to automate the process

import bpy
from bpy import context

def add_hide_driver(
        source, target, prop, dataPath,
        index = -1, negative = False, func = ''):

    if index != -1:
        d = source.driver_add( prop, index ).driver
        d = source.driver_add( prop ).driver

    v = d.variables.new()
    v.name                 = prop
    v.targets[0].id_type   = 'ARMATURE'
    v.targets[0].id        = target
    v.targets[0].data_path = dataPath

    d.expression = func + "(" + v.name + ")" if func else v.name
    d.expression = d.expression if not negative else "-1 * " + d.expression


for bone in armature.bones:
    add_hide_driver(target_obj,bone.id_data, 'hide_render', 'bones["'+bone.name+'"].hide')

This will achieve the same thing as copying driver from TV to Camera as mentioned in this answer


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .