Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2025 Feb 05 6:41 am)
Attached Link: http://www.pythonware.com/library/tkinter/introduction/radiobutton.htm
You didn't post your script but a copy of the message. The documentation suggests that the variable will track the value and vice versa, so you should just need to use the variables value to find the button state when you need it.Attached Link: http://www.3dtrue.com/poser/35.html
in case nobody discovers the problem, i have one work around. Namely, i created three separate command handlers for each radio button. This seems wrong but it solves the problem. So the script above will work if the lines with the handler def noiseTypeCB(self): are changed to def noiseTypeCB1(self) def noiseTypeCB2(self) def noiseTypeCB3(self)And each radio button's command call needs the correct function number too. Again this seems wrong, but it works. Also, anyone wanting this script can get it from my site as part of the free PoserPython Vol I collection. I just added this noise script to Vol I. It was not in there before this morning.
Thanks for reading.
you are right it used to say noiseV. Boy i have really screwed this whole thread up. So my fix overwrote my previous py's version with the problem, which i thought i had posted to this thread. anyways, sorry. still i know it didn't work till i applied the patch. I think the better post would have been to say, does anyone have a working example of using a Radiobutton in a python script and return the value properly? Yeah, i should have said that. :) cheers. james
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.

I am trying to add a radiobutton widget to my python script via Tkinter. I can make the radio button display, and i can return the result on the first radio click. If i click the radio buttons more than once however, the python script is unable to hear my new radio choices. The examples of using Python with the radio are kinda bleak. They are there, but seldom do the examples i have found actually call on the value. Again, this works, but only once. In fact, if you go under file and reinitialize python, the script again works fine (but only once). The script is designed to add noise to the current selected actor in the scene. You should be able to run this and it work the first radio click, then it no work no more. Anybody know why it's broken, or how i can fix it? I have attached the script for testing.