
LLegIKFKBTN = button ( label = 'IK / FK Switch', width = 150, height = 45, command = 'LLegSwitch()' ) LKneeIKBTN = Name of one of the IK button in the picker ( One of the many I'm trying to hide ) L_Leg_Switch_anslateX = Name of the attribute controlling the IK - FK Switch manually on the model If not I guess I'll just throw the whole thing in here, after adding like billions of comments 'cuz there's aren't that many not to say none in the code Not sure if this will be more helpful but, here is the line of the creation of the button and the ones of the function it has to execute.įor clarification sakes, I'm going to Identify each name that is truly relevant to the problem, not sure it will be that much more helpful tough. ( By the way, is it useful to say that I'm coding the whole thing directly into the script editor of Maya and not a tertiary coding software like Notepad++ )Īs for the code sorry, I didn't want to post like 1300 codes line here and be marked as spam ( which happen after I edited the post just to add the picture ) I also realized that the whole thing wasn't making any sense since I was just copying bits and pieces of my main code. In the end, the first lines of my program look like this! I started with basic Maya commands then proceed to Import pymel and functools as I was going on.

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įirst thanks for your answer but sadly it doesn't work, I'm quite new to the whole python stuff so maybe I bite more than I could chew.Īnyways, as far as the language I'm using I couldn't be less sure. If getAttr("bacon") = 1: # False condition but I use a real oneīutton ('HeadBTN', edit = True, visible = False)īutton ('HeadBTN', edit = True, visible = True) SHFacialBTN = button ( label = 'Show / Hide Button A', width = 150, height = 72, command = 'SHFacialBTN()' )# Button creation HeadBTN = button( label = 'Button A' )# Button creationįormLayout( CharaForm, edit = True, attachForm = )# edit of the form to put button in place With formLayout( width = 727 # Form Layout to create a dividerĬharaForm = formLayout()# Form Layout to put the button in Place Here a snippet of it explaining the general idea: 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.

I'm trying to toggle the visibility of a button on the click of another one.

Hi, I've been trying to find solve this for weeks, but now I'm growing more desperate than ever each day.
