been working on building the gui for a script i made for maya, and am having some issues with the change command of the "cmds.radioButtonGrp()" method, with it firing the change command twice every-time a new radio button is selected.
this is how im calling it.
cmds.radioButtonGrp( 'dupType', label='Duplicate Type', labelArray2=['Dupilcate', 'Instance'], numberOfRadioButtons=2, sl=1, cc=lambda z:createCurve() )
and i got other gui elemeants that use the change command fine and only fire it once as expected for each change to the feild.
Replies
labelArray2=['Dupilcate', 'Instance']
http://zetcode.com/tutorials/pyqt4/widgets/
@Jedi never really saw much point, since the gui literally has only 4 elements, and i dont need anything beyond the features already there in maya.cmds.
EDIT: Thanks again haiddasalami, using the oncommand(onc) made it work as wanted.
EDIT2: now a more complex question, is there a way to iterate through the render triangles with out having to first triangulate the mesh?
such as doing something like
and something like in the same for loop.
i got a case where i need to iterate through a list of objects, but also need to keep a count for some math that happens later on in the loop.
or even better just use the original loop arugmeant, but figure out which iteration of the loop the script is currently in.
That works more like a classic for loop (for int i = 0; i < length(x); i++) etc. Maybe Im not reading this right but let me know.
little tired tonight
haha drank a bunch of beers and on a shaky VIA train isnt fun so just wanted to make sure. Awesome you got it working!