def __init__(self, *args, **kwargs):
        """
        :type args: list
        :type kwargs: dict
        """
        mayabaseplugin.CreateWidget.__init__(self, *args, **kwargs)

        self._sequencePath = None
        start, end = mutils.currentFrameRange()

        self.ui.sequenceWidget = studioqt.ImageSequenceWidget(self)

        icon = studiolibraryplugins.resource().icon("thumbnail")
        self.ui.sequenceWidget.setIcon(icon)

        self.ui.layout().insertWidget(1, self.ui.sequenceWidget)
        self.ui.snapshotButton.parent().hide()
        self.ui.sequenceWidget.setStyleSheet(self.ui.snapshotButton.styleSheet())

        validator = QtGui.QIntValidator(-50000000, 50000000, self)
        self.ui.endFrameEdit.setValidator(validator)
        self.ui.startFrameEdit.setValidator(validator)

        self.ui.endFrameEdit.setText(str(int(end)))
        self.ui.startFrameEdit.setText(str(int(start)))

        self.ui.byFrameEdit.setValidator(QtGui.QIntValidator(1, 1000, self))
        self.ui.byFrameEdit.setText(str(self.settings().get("byFrame")))

        self.ui.sequenceWidget.clicked.connect(self.snapshot)
        self.ui.setEndFrameButton.clicked.connect(self.setEndFrame)
        self.ui.setStartFrameButton.clicked.connect(self.setStartFrame)
示例#2
0
    def __init__(self, *args, **kwargs):
        """
        :type args: list
        :type kwargs: dict
        """
        mayabaseplugin.CreateWidget.__init__(self, *args, **kwargs)

        self._sequencePath = None
        start, end = mutils.currentFrameRange()

        self.ui.sequenceWidget = studioqt.ImageSequenceWidget(self)

        icon = studiolibraryplugins.resource().icon("thumbnail")
        self.ui.sequenceWidget.setIcon(icon)

        self.ui.layout().insertWidget(1, self.ui.sequenceWidget)
        self.ui.snapshotButton.parent().hide()
        self.ui.sequenceWidget.setStyleSheet(
            self.ui.snapshotButton.styleSheet())

        validator = QtGui.QIntValidator(-50000000, 50000000, self)
        self.ui.endFrameEdit.setValidator(validator)
        self.ui.startFrameEdit.setValidator(validator)

        self.ui.endFrameEdit.setText(str(int(end)))
        self.ui.startFrameEdit.setText(str(int(start)))

        self.ui.byFrameEdit.setValidator(QtGui.QIntValidator(1, 1000, self))
        self.ui.byFrameEdit.setText(str(self.settings().get("byFrame")))

        self.ui.sequenceWidget.clicked.connect(self.snapshot)
        self.ui.setEndFrameButton.clicked.connect(self.setEndFrame)
        self.ui.setStartFrameButton.clicked.connect(self.setStartFrame)
示例#3
0
    def __init__(self, item=None, parent=None):
        """
        :type args: list
        :type kwargs: dict
        """
        item = item or AnimItem()
        transferitem.CreateWidget.__init__(self, item, parent=parent)

        self._sequencePath = None

        try:
            start, end = (1, 100)
            start, end = mutils.currentFrameRange()
        except NameError, e:
            logger.exception(e)
示例#4
0
    def __init__(self, item=None, parent=None):
        """
        :type item: studiolibrary.LibraryItem
        :type parent: QtWidgets.QWidget
        """
        item = item or AnimItem()
        super(AnimCreateWidget, self).__init__(item, parent=parent)

        self._sequencePath = None

        start, end = (1, 100)

        try:
            start, end = mutils.currentFrameRange()
        except NameError, e:
            logger.exception(e)
示例#5
0
    def __init__(self, item=None, parent=None):
        """
        :type item: studiolibrary.LibraryItem
        :type parent: QtWidgets.QWidget
        """
        item = item or AnimItem()
        super(AnimCreateWidget, self).__init__(item, parent=parent)

        self._sequencePath = None

        start, end = (1, 100)

        try:
            start, end = mutils.currentFrameRange()
        except NameError as error:
            logger.exception(error)

        self.createSequenceWidget()

        validator = QtGui.QIntValidator(-50000000, 50000000, self)
        self.ui.endFrameEdit.setValidator(validator)
        self.ui.startFrameEdit.setValidator(validator)

        self.ui.endFrameEdit.setText(str(int(end)))
        self.ui.startFrameEdit.setText(str(int(start)))

        self.ui.byFrameEdit.setValidator(QtGui.QIntValidator(1, 1000, self))
        self.ui.frameRangeButton.clicked.connect(self.showFrameRangeMenu)

        settings = studiolibrarymaya.settings()

        byFrame = settings.get("byFrame")
        self.setByFrame(byFrame)

        fileType = settings.get("fileType")
        self.setFileType(fileType)

        self.ui.byFrameEdit.textChanged.connect(self.saveSettings)
        self.ui.fileTypeComboBox.currentIndexChanged.connect(self.saveSettings)
示例#6
0
    def saveSchema(self):
        """
        Get the anim save schema.
        
        :rtype: list[dict]
        """
        start, end = (1, 100)

        try:
            start, end = mutils.currentFrameRange()
        except NameError as error:
            logger.exception(error)

        return [
            {
                "name": "name",
                "type": "string",
                "layout": "vertical"
            },
            {
                "name": "fileType",
                "type": "enum",
                "layout": "vertical",
                "default": "mayaAscii",
                "items": ["mayaAscii", "mayaBinary"],
                "persistent": True
            },
            {
                "name":
                "frameRange",
                "type":
                "range",
                "layout":
                "vertical",
                "default": [start, end],
                "actions": [
                    {
                        "name": "From Timeline",
                        "callback": mutils.playbackFrameRange
                    },
                    {
                        "name": "From Selected Timeline",
                        "callback": mutils.selectedFrameRange
                    },
                    {
                        "name": "From Selected Objects",
                        "callback": mutils.selectedObjectsFrameRange
                    },
                ]
            },
            {
                "name": "byFrame",
                "type": "int",
                "default": 1,
                "layout": "vertical",
                "persistent": True
            },
            {
                "name": "comment",
                "type": "text",
                "layout": "vertical"
            },
            {
                "name": "bakeConnected",
                "type": "bool",
                "default": False,
                "layout": "vertical",
                "persistent": True,
                "inline": True,
                "label": {
                    "visible": False
                }
            },
            {
                "name": "contains",
                "type": "label",
                "label": {
                    "visible": False
                }
            },
        ]