Ok, very weird issue now. I'm using my compiled PyQt in Maya 2014, and my interface comes up great. The problem is this--Signals and Slots seem to have died. NONE of my buttons actually seem to work. The same script works perfectly in 2012/2013. I've even taken my code and just put a print line into the slot and it never gets printed, which tells me that the signals aren't working. I'm using new-style signals and slots, which I don't think should be an issue.

Has anyone seen this, where the code works in one version of Maya and not another? I can post more code, but I don't know that it's particularly relevant (and is spread across a lot of files--I know, not very Pythonic, but I'm a C# guy, and this is supposed to be modular).

The gist is this:

from PyQt4 import QtCore, QtGui

import resources

import globalsettingsdlg
reload(globalsettingsdlg)
from globalsettingsdlg import GlobalSettingsDlg

from ..utils import gui as GuiUtils

from creator import centralwidget as cw, bonestudiowidget as bs
reload(cw)

from jdCRT.bonestudio import nodes
reload(nodes)

class jdCRT_CentralWidget(QtGui.QWidget, cw.Ui_jdCRT_CentralWidget):
    def __init__(self, parent=None):
        super(jdCRT_CentralWidget, self).__init__(parent)
        self.setupUi(self)
        self.initBoneStudioBTN.clicked.connect(self.initSkeleton)

    def initSkeleton(self, *args):
        skel = nodes.Skeleton()


class MainWindow(QtGui.QMainWindow):
    def __init__(self, parent=None):
        if parent == None:
            parent = GuiUtils.getMainWindow()
        super(MainWindow, self).__init__(parent)
        self.setWindowTitle("Character Rigging Tools")

        self.mainWidget = jdCRT_CentralWidget()
        self.mainWidget.tabWidget.setCurrentIndex(0)
        self.setCentralWidget(self.mainWidget)

        # Menu Bar
        toolsMenu = self.menuBar().addMenu("&Tools")
        settingsAction = QtGui.QAction(QtGui.QIcon(":icons/MainSettingsIcon.png"), 
"&Settings", self)
        helpText = "jdCRT Settings"
        settingsAction.setToolTip(helpText)
        settingsAction.setStatusTip(helpText)
        settingsAction.triggered.connect(self.SettingsWin)
        toolsMenu.addActions((settingsAction,))

        # Status Bar
        self.statusLabel = QtGui.QLabel()
        
self.statusLabel.setFrameStyle(QtGui.QFrame.StyledPanel|QtGui.QFrame.Sunken)
        status = self.statusBar()
        status.setSizeGripEnabled(False)
        status.addPermanentWidget(self.statusLabel)
        status.showMessage("Ready", 5000)

        self.show()
        self.raise_()

    def SettingsWin(self):
        print "Calling Settings Window"
        self.settingsWin = GlobalSettingsDlg(self)
        #self.settingsWin.show()
        settingsWin.exec_()

Both InitSkeleton (From a QPushButton) and SettingsWin (From a Menu Action) are not actually being called.

On 2/18/2014 8:24 PM, Joe Weidenbach wrote:
Just a quick update, the build of PyQt for 2014 went swimmingly straight from Autodesk's instructions.

On 2/16/2014 2:17 PM, Joe Weidenbach wrote:
And now I answered my own question LOL--apparently you don't need to build qt anymore to build PyQT :) I'll see how things go.

On 2/16/2014 2:14 PM, Joe Weidenbach wrote:
I updated the topic since it's off the original at this point.

That's on a "one of these days" list for me. My tool is for my Master's Thesis, and part of the original specification was that it would run on any version of Maya that supports Python. I got an adjustment to allow for PyQt, but if I moved to PySide I'd at the very least have to set up dual compatibility for older versions of Maya. Although, I'd really like to get this functional for 2014, has anyone had any luck getting PyQt to compile for it? I've never been able to get Qt to finish compiling without erroring out when following the Autodesk instructions, so I've never been able to build PyQt natively (and had to rely on pre-built versions).

On 2/16/2014 2:06 PM, Justin Israel wrote:
Also if you use PySide (which is now distributed with Maya 2014), their API is more like SIP v2, where they don't have the QVariants at all, as well as no QStrings.


On Mon, Feb 17, 2014 at 10:58 AM, Joe Weidenbach <[email protected] <mailto:[email protected]>> wrote:

The biggest thing for me has been to embrace the widget model. I had a lot of struggles trying to convert existing Maya
    interfaces over, which led to a lot of "how do I get x
    interface element in PyQt" questions (The framelayout was a
    particular headache for me, but I learned a lot about the
    internals of the layout system trying to rebuild it).  The
    thing is, PyQt gives you the base widgets to build just about
    anything you want, where maya gives you a lot of prebuilt
    interfaces so you can build very rapidly (while losing some
    flexibility in the process).

    So for me, the key was to redesign my interfaces from the
    ground up--not thinking about "how can I recreate this existing
    interface?", and instead thinking about "How do I want the user
    to experience this tool?"  It was a bit painful with all of the
    existing work I'd put in before I hit the limits of Maya's
    interface functionality, but once I started redesigning I
    realized that a lot of the choices I'd made before were to work
    within the limitations of the old system, and I was wasting a
    lot of time trying to recreate something that wasn't really
    necessary. From there, it was just "which element will
    accomplish what I'm looking for,"  and then diving into the
    documentation and forums to figure out how to do it.

    Working with the Qt Model/View/Delegate system has also been
    challenging, but no more so than it was with WPF for me.  The
    biggest challenge there is in working with the QVariants that
    Qt uses internally.  I also just discovered that you can put a
    definition in your imports to remove QVariants entirely for
    sip, but at this point my codebase has gotten rather large
    again so I just deal with them.


    On 2/16/2014 1:48 AM, Mark Serena wrote:
    Cheers Joe. Any other things helped you get a grasp of it?
    Always good to find some golden egg hidden on the inter-web/warren


    On Sun, Feb 16, 2014 at 5:06 PM, Joe Weidenbach
    <[email protected] <mailto:[email protected]>> wrote:

        Hey Mark,

        Just wanted to throw this out to you, I switched to PyQt
        about 8 months ago, and am finally getting the hang of it
        (of course I'm working on it part time between school, my
        day job (Where I use C# with WPF), my second job, and
        running an indie game development team, so that could
contribute to how long it's taken me to pick it up :P). It does take time to get used to the PyQt thought process,
        but it will come.  Of all the resources I've used, I keep
        coming back to Justin's, so you're on the right track with
        that one.

        Best of luck,

        Joe


        On 2/15/2014 5:39 PM, Mark Serena wrote:
        Cool, well there's a lot of new territory for me to
        cover, I'm currently watching your cmiVFX vid on PyQt and
        also got the one off CGSociety, so hopefully I'll feel
        less lost soon.
        Thanks again Justin.


        On Sun, Feb 16, 2014 at 12:35 PM, Justin Israel
        <[email protected] <mailto:[email protected]>>
        wrote:

            Hah, ya no worries. This wasn't the type of question
            I had posted about. It was based on my existing
            previous example, and more theoretical about how much
            could be done with the render view panel. I was
            interested in testing it.

            Technically mostly everything in the Maya UI can be
            hijacked to some extent. The render view button calls
            a runtime command that you could probably swap out to
            launch yours. If you made your app a scripted plugin,
            then you could have it hijack that functionality on
            plugin load, and restore it on unload maybe.

            On Feb 16, 2014 2:26 PM, "Mark Serena"
            <[email protected]
            <mailto:[email protected]>> wrote:

                Ooooo that's perfect!!! Thank you very much for
                looking into that Justin, I remember your post
                about people asking questions and expecting the
                answer laid out for them, I wasn't trying to coax
                you into writing anything, but thank you for the
                example!
                It's possible to make the default render button
                launch my new UI right? I'm sure the Charcoal
                Script Editor that Chris Zubrigg does this. I
                might look into that and that should stop the
                focus being stolen?

                Thanks again!


-- 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
        [email protected]
        <mailto:[email protected]>.
        To view this discussion on the web visit
        
https://groups.google.com/d/msgid/python_inside_maya/CACfkVJc1bK3gtw-qi43-uG-fnhfT8Y5xhbe4eLLvyTv59wuU8A%40mail.gmail.com.


        For more options, visit
        https://groups.google.com/groups/opt_out.

-- 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/pTUd6aYeQCg/unsubscribe.
        To unsubscribe from this group and all its topics, send an
        email to [email protected]
        <mailto:python_inside_maya%[email protected]>.
        To view this discussion on the web visit
        
https://groups.google.com/d/msgid/python_inside_maya/53005571.3090308%40gmail.com.


        For more options, visit
        https://groups.google.com/groups/opt_out.


-- 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
    [email protected]
    <mailto:[email protected]>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/python_inside_maya/CACfkVJeifenCBy-sY6DUU8_e571SBUFBgu78N3tPnHXvraZgVw%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.

-- 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
    [email protected]
    <mailto:python_inside_maya%[email protected]>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/python_inside_maya/53013486.2000502%40gmail.com.


    For more options, visit https://groups.google.com/groups/opt_out.


--
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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3HTLNhMaiiHgsm5scE1r%2B%3DH8QJb6jVbenm2XwwgoBSmA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.




--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/530A671D.6010607%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to