Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-16 Thread Rishis3D
Hi Guys, this is my final ui for Character Selection uing PyQt http://vimeo.com/55749764 thank u you guys for helping me to complete this ui regards rishis3D -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To post to

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-10 Thread Justin Israel
I forget off-hand if there is a better way without looking for myself right now, but you can just loop over the buttons and check if their rect intersects the one form your rubberband: selection = QtCore.QRect(0,0,500,500) button1 = QtCore.QRect(20,20,100,20) print selection.intersects(button1) #

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-10 Thread Rishis3D
i'm implemented the QRubberBand class with three mouse event to do draw rectangle box inside my ui. but i dont know how to get my buttons within that rectangle area using QRect class -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Justin Israel
No that would not need to be part of a custom qpusbutton. That is just a feature of the parent widget and you controlling the children widgets. On Fri, Dec 7, 2012 at 12:23 PM, Rishis3D wrote: > But i have to implement into my Qpush Button ..am i correct? > > > -- > view archives: http://groups

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Rishis3D
But i have to implement into my Qpush Button ..am i correct? -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Rishis3D
ok justin and kurian.. let me try.. -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Kurian O.S
http://www.diotavelli.net/PyQtWiki/Selecting%20a%20region%20of%20a%20widget hope this help at some point. On Fri, Dec 7, 2012 at 11:25 AM, Justin Israel wrote: > Take a look at the > QRubberband. > It lets you draw bounding rectangles around an

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Justin Israel
Take a look at the QRubberband. It lets you draw bounding rectangles around an area. You can then use that bounding rect to ask your widget about which children are inside the rect. On Fri, Dec 7, 2012 at 11:10 AM, Rishis3D wrote: > Yes , to

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Rishis3D
Yes , to activate or select the buttons especially Fingers region in ui.. like if they want to select only two finger controls(each three, totally 6 controls). it could be easy to select instead of shift selecting bunch of buttons that closest to each other -- view archives: http://group

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Justin Israel
Do you mean you want a rectangle selection to make them all focused? What is the actual usage of that? Animators love to marquee select items that they can affect all at once. So this would be for them to... activate the buttons all with one key? On Fri, Dec 7, 2012 at 10:50 AM, Rishis3D wrote:

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Rishis3D
Thanks Justin, and one more doubt i want to ask.. how to select these buttons using rectangular marquee selections..? .. becoz animators really love's that option.. right? -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.goo

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Justin Israel
Looks really cool! Nice work. -- justin On Fri, Dec 7, 2012 at 8:07 AM, Rishis3D wrote: > > > this is my UI > > -- > view archives: http://groups.google.com/group/python_inside_maya > change

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Rishis3D
this is my UI -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-07 Thread Rishis3D
Awesome Justin... its working.. i like the second option..its nice and simple.. soon ill update my working ui here thanks -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-06 Thread Justin Israel
Two options: Use functools.partial to wrap each slot: ### from functools import partial ... for btn in buttons: cbk = partial(self.mymenu, btn) btn.customContextMenuRequested.connect(cbk) ... def mymenu(self, btn, point): ... ### Or check the sender of the signal in the slot: ### def

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-06 Thread Rishis3D
[image: More message actions] 17:35 (less than a minute ago) Other recipients: ok.. i got my all buttons from findChildren() function now iter all buttons to add setContextMenuPolicy and customcontextMenuRequested like this for btn in button: btn.setContextMenuPolicy(Qt.CustomContex

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-06 Thread Rishis3D
ok.. i got my all buttons from findChildren() function now iter all buttons to add setContextMenuPolicy and customcontextMenuRequested like this for btn in button: self.Button.setContextMenuPolicy(Qt.CustomContextMenu) self.Button.customContextMenuRequested.connect(self.mymenu) menu = QtGui.QMen

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-05 Thread Justin Israel
Assuming you have already added them to the button group, you can just get the list: http://doc.qt.digia.com/qt/qbuttongroup.html#buttons But if your buttons were added to a layout in designer, then you can ask the layout: http://doc.qt.digia.com/qt/qlayout.html Loop over the count() and itemAt(in

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-05 Thread Rishis3D
ok, how do i iterate or grab all my Qpush Btn from my UI Python File to add them all in to a QButtonGroup ? right now i did manually.. and i hv more then 50 buttons... beocoz i created my ui file in Qt Designer and converted into a python file using pyuic4 module -- view archives: http://group

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-05 Thread Justin Israel
Connect the signal of each button to the same slot. On Wednesday, December 5, 2012, Rishis3D wrote: > sorry my mistake > > popup works fine in a single button > > but in my case i have losts of button, and i have add them all in a > QButton Group, > to get buttonclick event from QButton Group >

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-05 Thread Rishis3D
sorry my mistake popup works fine in a single button but in my case i have losts of button, and i have add them all in a QButton Group, to get buttonclick event from QButton Group so tat i can use single function for button call back command so how do connect customContextMenuRequested .connec

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-05 Thread Rishis3D
Hi Justin, thanks for u reply i used CustomContextMenu to create my popup menu on my button here is my code is used.. self.Button = QPushButton('Button') self.Button.setContextMenuPolicy(Qt.CustomContextMenu) self.Button.customContextMenuRequested.connect(self.mymenu) menu = QtGui.QMenu() menu

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-04 Thread Justin Israel
You have 3 different ways to show a context menu, depending on the level of control you want: ContextMenuPolicy-enum Qt::DefaultContextMenu1the widget's QWidget::contextMenuEvent(

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-04 Thread Rishis3D
context menu that happens only on right click -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-04 Thread Justin Israel
Do you want the button to do a normal popup menu on left click, or a context menu that happens only on right click? For normal popup: http://doc.qt.digia.com/qt/qpushbutton.html#setMenu For context menus: http://doc.qt.digia.com/qt/qwidget.html#contextMenuPolicy-prop On Dec 4, 2012, at 4:48 AM,

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-04 Thread Rishis3D
ok guys its working now i want to create a popupMenu for a Particular QpushButton with some menu items, like maya popupMenu() command? how do i add tat? thanks -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/grou

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread Rishis3D
Thanks Justin and Carlos.. for your example Code ill try to implement and let u know -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread Justin Israel
>From Carlos's maya commands module solution, I have also updated my previous solution with the equivalent example using QApplication.keyboardModifiers. This does not require a custom push button as you can do it all (same as maya cmds) in your handler: https://gist.github.com/4197119 On Mon, D

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread ammu0608
I don't think that you can select multiple button by using shift key. I think you have to use checkable option. Let's see what others have to say about this. Thanks and Regards, Sudeepth Patinjarayi. On Dec 4, 2012 12:24 AM, "Rishis3D" wrote: > if i use list widget .. then there is no point of u

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread carlosrico
getModifiers? http://download.autodesk.com/global/docs/maya2013/en_us/CommandsPython/getmodifiers.html I don't know if it is exactly what you are asking, but you can get what keys are pressed with this command and perform commands accordingly, for instance append to an existing selection as you

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread Justin Israel
You can modify a QPushButton and check for the keyboard modifiers. I wrote an example for you: https://gist.github.com/4197119 -- justin On Mon, Dec 3, 2012 at 10:53 AM, Rishis3D wrote: > if i use list widget .. then there is no point of using GUI.. so i cant > use list widget ... the main pur

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread Rishis3D
if i use list widget .. then there is no point of using GUI.. so i cant use list widget ... the main purpose of UI is easy to select ctrls in UI then viewport selection.. becoz i have a Characater Image in the BG of my UI.. so i can select easily select the particular body of ctrls in UI and if

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread ammu0608
Ok. I think you better use a list widget to list all the control name and use multiple selection because it saves a lot of ui space. But if you want to use button, try using checkable option in button where you can select or check multiple button at the same time... Thanks and Reagrds, Sudeepth P

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread Rishis3D
No.. Each Button will select one Rig Ctrl.. but if i use shift key and select multiple button one by one .. the appropriate controls will add in selection.. -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread ammu0608
You mean you want to select multiple rig controls by pressing a single push button. Thanks and Reagrds, Sudeepth Patinjarayi. On Dec 3, 2012 11:28 PM, "Rishis3D" wrote: > Multiple selection of Character Rig Controls using shift key .. just like > normal Maya multiple selecting of objects.. > > -

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread Rishis3D
Multiple selection of Character Rig Controls using shift key .. just like normal Maya multiple selecting of objects.. -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread Justin Israel
Multiple selections of what exactly? A list view? You want to be able to select multiple amounts of something using shift, and then hit a single push button to do something? On Mon, Dec 3, 2012 at 9:35 AM, ammu0608 wrote: > Please be clear when you ask some thing. Your question is not so clear

Re: [Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread ammu0608
Please be clear when you ask some thing. Your question is not so clear. Its creating confusion. Be clear for a good reply. Thanks and Reagrds, Sudeepth Patinjarayi. On Dec 3, 2012 9:31 PM, "Rishis3D" wrote: > Hi, > > i'm doing a character Selection GUI using Designer for Maya. > How so i impleme

[Maya-Python] Multiple Qpush Btn selection of Character UI

2012-12-03 Thread Rishis3D
Hi, i'm doing a character Selection GUI using Designer for Maya. How so i implement multiple selection functionality using Shift key for multiple selection of Ctrls in Qpush Button? thanks -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: