I'm currently in the middle of working on a GUI in maya. I'm finally getting my head around the layout and positioning of all the buttons/forms/layouts etc... But I'm having some problems with certain aspects of the GUI and am hoping someone might be able to give some advice, these are the two problems I have at the moment
1. I have some sliders that I want to connect to the attributes of a node. These two in particular control the number of sub divisions on a plane. The problem I have is that when the GUI is launched the node doesn't exist yet (it gets created by the GUI later) so I tried to use the Attr Slider Group but it complains that the node does not exist and therefore the connection fails causing the GUI to not launch. Ok, so that failed so I tried to use Int Group Slider and then manually link it using connectControl command. This seems to work (well at least there's no errors) but the control does not appear to link correctly. Is there any way of creating a Attr Slider Group which can be linked to a node that doesn't exist yet or loads in a disabled state?
2. I have a button that loads an external file and links it to a node. At the same time I made it a symbol button so that when the user selects the file, it changes the image of the button to match the file. The problem I have with this button is that when it assigns the image to the button it does not resize it and only shows the pixel portion of it that I have specified. Is there anyway to get a symbol button to rescale the image so it fits? or alternatively is it possible to place a Texture Preview control (like that of the file node) on the GUI?
Thanks in advance!