def __init__(self, parent = getMayaMainWindow()):
        super(OnionSkinRendererWindow, self).__init__(parent)
        
        # This registers the override in maya
        # I previously had it as plugin, but this made it impossible to get
        # the viewRenderOverrideInstance (sth to do with python namespaces i guess)
        # so i just call init myself.
        # It feels a bit hacky, but it works anyway
        onionCore.initializeOverride()

        # member variables
        self.mOnionObjectSet = set()
        self.mAbsoluteOnionSet = set()
        # TODO let the user set the amount of relative onions with a prefs file
        self.mRelativeFrameAmount = 8

        # create the ui from the compiled qt designer file
        self.setupUi(self)

        # create the clear buffer button
        self.onionFrames_clearBuffer_btn = QtWidgets.QPushButton('Clear Buffer')
        self.onionFrames_tab.setCornerWidget(self.onionFrames_clearBuffer_btn)
        self.onionFrames_clearBuffer_btn.clicked.connect(self.clearBuffer)

        # set the colors of the color picker buttons
        # TODO: specify colors in prefs file
        self.setOnionColor(self.relative_futureTint_btn, [45,255,120])
        self.setOnionColor(self.relative_pastTint_btn, [255,45,75])
        self.setOnionColor(self.absolute_tint_btn, [200,200,50])

        self.refreshRelativeFrame()
        
        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)

        self.createConnections()
예제 #2
0
    def __init__(self, parent=getMayaMainWindow()):
        super(OnionSkinRendererWindow, self).__init__(parent)
        # the dockable feature creates this control that needs to be deleted manually
        # otherwise it throws an error that this name already exists
        self.deleteControl('onionSkinRendererWorkspaceControl')

        # This registers the override in maya
        # I previously had it as plugin, but this made it impossible to get
        # the viewRenderOverrideInstance (sth to do with python namespaces i guess)
        # so i just call init myself.
        # It feels a bit hacky, but it works anyway
        onionCore.initializeOverride()

        # member variables
        self.mOnionObjectSet = set()
        self.mAbsoluteOnionSet = set()
        self.mPrefs = {}
        self.mRelativeFrameAmount = 8
        self.mToolPath = os.path.dirname(os.path.abspath(
            inspect.stack()[0][1]))
        self.mActiveEditor = None

        # create the ui from the compiled qt designer file
        self.setupUi(self)

        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)

        self.createConnections()

        self.setOnionType()

        # load settings from the settings file
        self.loadSettings()
예제 #3
0
    def __init__(self, parent = getMayaMainWindow()):
        super(OnionSkinRendererWindow, self).__init__(parent)
        
        # This registers the override in maya
        # I previously had it as plugin, but this made it impossible to get
        # the viewRenderOverrideInstance (sth to do with python namespaces i guess)
        # so i just call init myself.
        # It feels a bit hacky, but it works anyway
        onionCore.initializeOverride()

        # member variables
        self.mOnionObjectSet = set()
        self.mAbsoluteOnionSet = set()
        # TODO let the user set the amount of relative onions with a prefs file
        self.mRelativeFrameAmount = 8

        # create the ui from the compiled qt designer file
        self.setupUi(self)

        # create the clear buffer button
        self.onionFrames_clearBuffer_btn = QtWidgets.QPushButton('Clear Buffer')
        self.onionFrames_tab.setCornerWidget(self.onionFrames_clearBuffer_btn)
        self.onionFrames_clearBuffer_btn.clicked.connect(self.clearBuffer)

        # set the colors of the color picker buttons
        # TODO: specify colors in prefs file
        self.setOnionColor(self.relative_futureTint_btn, [45,255,120])
        self.setOnionColor(self.relative_pastTint_btn, [255,45,75])
        self.setOnionColor(self.absolute_tint_btn, [200,200,50])

        self.refreshRelativeFrame()
        
        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)

        self.createConnections()