Determining which radio buttons is called

18 views
Skip to first unread message

likage

unread,
Dec 9, 2014, 2:20:48 AM12/9/14
to python_in...@googlegroups.com
I have create a UI with 3 radio buttons, and in my adjust_tangents function, I am a bit stumped and need some help in it.

Rather than printing out that one particular sentence it has if any one of the three radio buttons are selected, it is actually printing out a bunch of the same sentences

For example, if the first radio button is selected, the script log is print out 20 times of ">>> Auto Spline onto first and last frame"
Are there any ways in which I can simplify it?

My code: http://pastebin.com/raw.php?i=4msivp8T

Marcus Ottosson

unread,
Dec 9, 2014, 2:59:35 AM12/9/14
to python_in...@googlegroups.com
If you use PEP8 for the names of your functions and classes, it makes it a little easier for everyone to read.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/44f5d983-ac02-4433-9d8a-e3a11e60a292%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Justin Israel

unread,
Dec 9, 2014, 5:22:23 AM12/9/14
to python_in...@googlegroups.com
You are looping over all of the animCurves and printing for each one. So, how many animCurves are there? 20?
There isn't anything else in your example that would explain it otherwise.

Reply all
Reply to author
Forward
0 new messages