UI script & armature properties tab "solo" bone collections...

I suspect the functionality to "solo" bone collections (the little star icon) overrides the buttons added by the UI script... couldn't figure out why my script wasn't working like it should - but when all layers are "un-solo-ed" it works perfectly.

1 love
Reply
  • Dwayne Savage(dillenbata3) replied

    Yes it overrides the visible(eye icon) which is all the script does. It sets the visible to true/false. 

    2 loves
  • Wayne Dixon replied

    Glad you figured it out, Christof.
    Yes, the solo functionality will override the other visibility settings.

    That makes me wonder if there is a easy way to add the solo functionality to the ui script in an effective way.

    2 loves
  • Dwayne Savage(dillenbata3) replied
    Solution

    I don't know about layout, but to add the functionality you just have to change is_visible to is_solo.

    row.prop(context.active_object.data.collections["Root"], "is_visible",toggle=True, text="Root")
    row.prop(context.active_object.data.collections["Root"], "is_solo",toggle=True, text="Root Solo")

    Of course if you wanted to use the icon you could do something like this:

    row.prop(context.active_object.data.collections["Root"], "is_visible",toggle=True, text="Root")
    if context.active_object.data.collections["Root"].is_solo:
         row.prop(context.active_object.data.collections["Root"], "is_solo",toggle=True, text="", icon="SOLO_ON")
    else:
         row.prop(context.active_object.data.collections["Root"], "is_solo",toggle=True, text="", icon="SOLO_OFF")


    4 loves
  • Motionbones replied

    This works so well - thanks Dwayne.

    1 love