UI script & armature properties tab “solo” bone collections…

Forum Archive UI script & armature properties tab “solo” bone collections…

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #19228

    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.

    #91372
    Dwayne Savage
    Participant

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

      #91373
      Wayne Dixon
      Participant

        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.

        #91374
        Dwayne Savage
        Participant

          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")


          #91375

          This works so well – thanks Dwayne.

        Viewing 5 posts - 1 through 5 (of 5 total)
        • The topic ‘UI script & armature properties tab “solo” bone collections…’ is closed to new replies.