from ftrackplugin import ftrackDialogsfrom fido import common
from maya.app.general.mayaMixin import MayaQWidgetDockableMixinfrom PySide2 import QtWidgets, QtCore controlName = 'foobar'
class FooWidget(MayaQWidgetDockableMixin, QtWidgets.QWidget): def __init__(self, parent=None): super(FooWidget, self).__init__(parent=parent) global controlName self.setObjectName(controlName) self.setWindowTitle(controlName) vlayout = QtWidgets.QVBoxLayout(self) # ftrackImportDialog just becomes a QWidget ftrackImportDialog = ftrackDialogs.ftrackImportAssetQt() vlayout.addWidget(ftrackImportDialog) self.setLayout(vlayout)
# getMainWindow is just a wrapper function around the regular ways mw = common.getMainWindow() bar = FooWidget(mw)
workspaceControlName = bar.objectName() + 'WorkspaceControl'
mayaPanelName = "AttributeEditor"mc.setParent(mayaPanelName)
if mc.workspaceControl(workspaceControlName, q=True, exists=True): mc.workspaceControl(workspaceControlName, e=True, close=True) mc.deleteUI(workspaceControlName, control=True) bar.show(dockable=True, area='right', floating=False)mc.workspaceControl(workspaceControlName, edit=True, tabToControl=[mayaPanelName, -1], widthProperty="preferred", minimumWidth=620)bar.raise_()
I'm noticing a similar defect myself and was scouring the interwebs to hopefully find an resolution. Did you solve this yet?
The closest I've gotten is adding .update() and .repaint() in various locations, but I shouldn't have to and it is difficult to catch everything.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/LDRrxw9pJyo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/51ea3878-db26-4cb0-8fe6-7c5b4e80dd2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Be very careful with your calls to processEvents(). In my experience it can be a source of bugs if you do it without being aware of the effects. I have seen situations where it happens in an event call stack which then causes the event loop to run again and create a deeper stack. Then bugs can either happen in that deeper stack from new events being triggered or during the unwind when, say, a model has been invalidated but you go to work with it in the original stack frames. I have also seen recursion bugs happening when processEvents is hit in the nested stack frame and continue to trigger.
Justin
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/08e3e66a-2124-4d5e-b122-474cd7b4b45d%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/LDRrxw9pJyo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/89c6cc4b-3854-4c33-a4c5-d641e51e2c67%40googlegroups.com.
Seems to still work like shit in maya 2018. Seriously.....
On Tue, Aug 8, 2017 at 4:13 AM, Michael Boon <boon...@gmail.com> wrote:
I few days ago I ran a script from the Script Editor, which ran a robocopy from a network location, and contained a call to processEvents. It created an infinite loop of robocopy calls. I had to restart my PC to stop it!
On Tuesday, 8 August 2017 05:34:03 UTC+10, Cole O'Brien wrote:Gotcha, yeah totally not a great solution in the long run. I had yet to find a simple solution to this online, so I figured this would be helpful for those that need something quick.
Thanks for the info though, I'll keep an eye out for bugs down the line.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/LDRrxw9pJyo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsubscribe@googlegroups.com.
Whole interface goes crazy when running the code and sometimes selection do not work.