Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I've been trying to find solve this for weeks, but now I'm growing more desperate than ever each day. So here's the deal!
I'm trying to toggle the visibility of a button on the click of another one. I don't know if I'm just horrible at doing research but it seems like nobody is running into that issue, so I have to assume it's something really simple and I'm just way to dumb to figure it.
Here a snippet of it explaining the general idea:
def CharaPickerUI():
if window('PickerUI', exists = True):
deleteUI('PickerUI')
PUI = window('PickerUI')
with formLayout( width = 727 # Form Layout to create a divider
CharaForm = formLayout()# Form Layout to put the button in Place
HeadBTN = button( label = 'Button A' )# Button creation
formLayout( CharaForm, edit = True, attachForm = [(HeadBTN , 'top', 123 ), (HeadBTN , 'left', 319 )])# edit of the form to put button in place
SHFacialBTN = button ( label = 'Show / Hide Button A', width = 150, height = 72, command = 'SHFacialBTN()' )# Button creation
showWindow('PickerUI')
def LLegSwitch(
if getAttr("bacon") == 1: # False condition but I use a real one
button ('HeadBTN', edit = True, visible = False)
else:
button ('HeadBTN', edit = True, visible = True)
CharaPickerUI()
Here's a picture of my whole UI the button circled in orange are supposed to switch the visibility of the IK/FK controler in the UI
Solved! Go to Solution.