Re: Toggling toolbar buttons
I now know exactly what to pester several people about for the rest of the year! Thanks Luc. On Thu, Dec 13, 2012 at 12:26 AM, Luc-Eric Rousseau wrote: > there is a missing feature in the SDK to make a toolbar button behave like > Autokey and others that work. it's a dumb little thing that I have no clue > why it wasn't exposed. Internally, all commands can have a "selected" > state. this is reflected by having the menues checked or their buttons > pushed automatically. This selected state also allows command to detect > when the keyboard shortcut is pushed and released, like the all the tool > related commands do. > > > On Monday, December 10, 2012, Gustavo Eggert Boehs wrote: > >> Thanks for all the help guys, very useful info... sadly I was trying to >> setup a button in the interface, much like Autokey, so a menu or a PPG >> wouldnt be the best solutions... >> >> For now I´ll have the a regular button and just log the state of the >> tool. But that is just putting to much trust in the hands of animators :p >> > -- Our users will know fear and cower before our software! Ship it! Ship it and let them flee like the dogs they are!
Re: Toggling toolbar buttons
there is a missing feature in the SDK to make a toolbar button behave like Autokey and others that work. it's a dumb little thing that I have no clue why it wasn't exposed. Internally, all commands can have a "selected" state. this is reflected by having the menues checked or their buttons pushed automatically. This selected state also allows command to detect when the keyboard shortcut is pushed and released, like the all the tool related commands do. On Monday, December 10, 2012, Gustavo Eggert Boehs wrote: > Thanks for all the help guys, very useful info... sadly I was trying to > setup a button in the interface, much like Autokey, so a menu or a PPG > wouldnt be the best solutions... > > For now I´ll have the a regular button and just log the state of the tool. > But that is just putting to much trust in the hands of animators :p >
Re: Toggling toolbar buttons
Sometimes I use a display info custom param. to leave something in the viewport so I know the script is running. Martin On 2012/12/11, at 2:20, Gustavo Eggert Boehs wrote: > Thanks for all the help guys, very useful info... sadly I was trying to setup > a button in the interface, much like Autokey, so a menu or a PPG wouldnt be > the best solutions... > > For now I´ll have the a regular button and just log the state of the tool. > But that is just putting to much trust in the hands of animators :p
Re: Toggling toolbar buttons
Thanks for all the help guys, very useful info... sadly I was trying to setup a button in the interface, much like Autokey, so a menu or a PPG wouldnt be the best solutions... For now I´ll have the a regular button and just log the state of the tool. But that is just putting to much trust in the hands of animators :p
Re: Toggling toolbar buttons
I remember them adding stateful entries to menus, but I don't think toolbars have an equivalent ala snap panel. If there is one, I can't say I've seen it done or used insofar. I'll give it a 50/50 chance that you could add a menu entry to a toolbar with stateful checks. On Sun, Dec 9, 2012 at 12:46 PM, Simon Anderson < simonbenandersonl...@gmail.com> wrote: > Nice bit of code, but thats for a PPG, not a toolbar, was also thinking of > that then I read the post, but toolbars I dont think its possible. > If you were creating a plugin Tool then that would work. >
Re: Toggling toolbar buttons
oh, and I'm afraid it is windows only...don't know how it looks like on other OS. 2012/12/8 Fabricio Chamon > Hey Gustavo, does it have to be a button ? If not, here's a very nice > trick from Jeremie Passerin: > > var cp = ActiveSceneRoot.AddCustomProperty("MyCustomPSet", false ); > var layout = cp.PPGLayout; > cp.AddParameter3("myBooleanParam", siBool); > item = layout.AddItem("myBooleanParam", "", "dscontrol") > item.SetAttribute("class", "button") > item.SetAttribute(siUICaption, "Toggle Button") > item.SetAttribute(siUIStyle, 0x1003) > item.SetAttribute(siUINoLabel, true) > inspectObj(cp); > > ...then put your code under the "_OnChanged" callback. > >
Re: Toggling toolbar buttons
Hey Gustavo, does it have to be a button ? If not, here's a very nice trick from Jeremie Passerin: var cp = ActiveSceneRoot.AddCustomProperty("MyCustomPSet", false ); var layout = cp.PPGLayout; cp.AddParameter3("myBooleanParam", siBool); item = layout.AddItem("myBooleanParam", "", "dscontrol") item.SetAttribute("class", "button") item.SetAttribute(siUICaption, "Toggle Button") item.SetAttribute(siUIStyle, 0x1003) item.SetAttribute(siUINoLabel, true) inspectObj(cp); ...then put your code under the "_OnChanged" callback.
Re: Toggling toolbar buttons
I don't believe so. Eric Thivierge http://www.ethivierge.com On Sat, Dec 8, 2012 at 12:05 PM, Gustavo Eggert Boehs wrote: > Hi guys > > Anybody know if it is possible to Toggle toolbar buttons so they stay > "pressed"? Cant seem to find this in the Docs... > I know it is possible with PyQt, but it is something I want to fit in the > main UI. > > Cheers > -- > Gustavo E Boehs >