Your QDialog has a function called mapToGlobal(), which is inherits because
its a subclass of QWidget.
mapToGlobal takes a point that is local to the current object and remaps it
to the global position.
When your button calls that custom context menu slot, popup(), it passes it
the position (point
Yeah, I'm still unclear as to what's happening in the popup() function
of the code. Specifically:
action = menu.exec_(self.mapToGlobal(pos))
I'm guessing it's just executing or generating the menu, but the extra
_(self.mapToGlobal(pos)) I'm not sure how to use elsewhere...
On Dec 6, 9:55 pm, Ju
It might be worth noting that Pymel has a great little utility to load a
Logging Control menu into the maya GUI.
from pymel.tools import loggingControl
loggingControl.initMenu()
Just for anyone reading this in case they want to control the log level in
the interactive session of any module that u
Yury,
First create a logging object. If you are running this from the script
editor, you will need to set propagate = False so maya does not catch and
resend your message in the format you see above. Also, I would recommend
the log handler provided by PyMel as it is already wired up to the correc
from PyQt4.QtGui import *
from PyQt4.QtCore import *
class Window(QDialog):
def __init__(self, parent=None):
super(Window, self).__init__(parent)
self.vl = QVBoxLayout()
self.btn = QPushButton()
self.vl.addWidget(self.btn)
self.setLayout(self.vl)
Hi there,
while I can manipulate display layers through MEL commands (creating
new layers, adding members, etc...), I can't seem to spot anything
that lets me do the same thing on API level.
apiTypeStr correctly return kDisplayLayer, but I can't seem to find a
class or function set that will work