Hey Justin, that's exactly what I was looking for. Thanks you very much. I
tried other widgets too and it works, great!
*Carlos Rico Adega
*Maya Generalist*
*-
http://www.vimeo.com/16765581
LinkedInhttp://www.linkedin.com/pub/carlos-rico/6/58/325
On Friday, May 31, 2013 4:39:41 AM UTC-7, Carlos Rico wrote:
Hi. I know I can mix Qt widgets and Maya UI controls and that Qt widgets can
have context menus but, I like Maya's Radial Marking menu feature a lot and
all of a sudden I wonder, does PyQt have something similar to a Maya
To populate context menu
# Clear the list
for e in myContextMenu .actions():
myContextMenu.removeAction(e)
# Populate the list
if dataItems:
myContextMenu.addAction(PyQt4.QtGui.QAction('Reset', self))
myContextMenu.addSeparator()
for e in dataItems:
Is that a marking menu or just a normal menu? He was asking about marking
menus.
On Jun 14, 2013 7:03 AM, Christian Akesson cakesso...@gmail.com wrote:
To populate context menu
# Clear the list
for e in myContextMenu .actions():
myContextMenu.removeAction(e)
# Populate the list
if
On Thursday, June 13, 2013 12:53:06 PM UTC-7, Justin Israel wrote:
Is that a marking menu or just a normal menu? He was asking about marking
menus.
On Jun 14, 2013 7:03 AM, Christian Akesson cakes...@gmail.com wrote:
To populate context menu
# Clear the list
for e in myContextMenu
Thanks for the responses. I will assume that, one, I cannot attach a Maya
marking menu to a PyQt widget and two, I cannot recreate a marking menu
with PyQt, meaning having items in north, south, east, west, etc.
positions. I guess I have to stick to regular Qt context menus or use Maya
buttons
I threw together a quick example that seems to work fine:
https://gist.github.com/justinfx/5778557
You just need to translate your qt button into the maya path, so you can
give it to the marking menu as the parent.
Is that what you are after?
On Fri, Jun 14, 2013 at 11:21 AM, CharlieWales
This is not a solution but maybe help
http://www.djx.com.au/blog/2008/03/13/user-marking-menu-hot-keys/
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from sip import wrapinstance
import maya.OpenMayaUI as omui
import maya.mel as mel
import maya.cmds as cmds
qMayaWindow =