Beispiel #1
0
 def setupUi(self, Dialog):
     Dialog.setWindowTitle('Warning !!!')
     Dialog.setObjectName('Dialog')
     Dialog.resize(200, 150)
     #--+--+--+--+
     self.verticalLayout = QtGui.QVBoxLayout(Dialog)
     self.verticalLayout.setContentsMargins(-1, 0, -1, -1)
     #--+--+--+--+
     self.btn_title = QtGui.QPushButton(Dialog)
     self.btn_title.setEnabled(False)
     self.btn_title.setStyleSheet('background-color: rgba(0, 0, 0, 0);')
     
     icon = QtGui.QIcon()
     image_name = {'e':'futil_error.png', 'w':'futil_warning.png'}.get(self.waringType, 'futil_ask.png')
     title_image = os.path.join(scriptTool.getScriptPath(), 'icons', image_name)
     icon.addPixmap(QtGui.QPixmap(title_image), QtGui.QIcon.Disabled, QtGui.QIcon.Off)
     
     self.btn_title.setIcon(icon)
     self.btn_title.setIconSize(QtCore.QSize(35, 35))
     self.verticalLayout.addWidget(self.btn_title)
     #--+--+--+--+
     self.label = QtGui.QLabel('? ? ?', Dialog)
     font = QtGui.QFont()
     font.setPointSize(11)
     self.label.setFont(font)
     self.label.setAlignment(QtCore.Qt.AlignCenter)
     self.label.setObjectName('label')
     self.verticalLayout.addWidget(self.label)
     self.verticalLayout.addItem(QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding))
     #--+--+--+--+
     self.horizontalLayout = QtGui.QHBoxLayout()
     self.horizontalLayout.setSpacing(3)
     self.horizontalLayout.addItem(QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum))
     #--+--+--+--+
     self.btn_OK = QtGui.QPushButton('OK', Dialog)
     self.btn_OK.setMinimumSize(QtCore.QSize(100, 25))
     icon1 = QtGui.QIcon()
     icon1.addPixmap(QtGui.QPixmap(os.path.join(scriptTool.getScriptPath(), 'icons', 'futil_ok')), QtGui.QIcon.Normal, QtGui.QIcon.Off)
     self.btn_OK.setIcon(icon1)
     self.btn_OK.setIconSize(QtCore.QSize(22, 22))
     self.horizontalLayout.addWidget(self.btn_OK)
     QtCore.QObject.connect(self.btn_OK,     QtCore.SIGNAL('clicked()'), Dialog.accept)
     #--+--+--+--+
     if self.waringType != 'e':
         self.btn_Cancle = QtGui.QPushButton('Cancle', Dialog)
         self.btn_Cancle.setMinimumSize(QtCore.QSize(100, 25))
         icon2 = QtGui.QIcon()
         icon2.addPixmap(QtGui.QPixmap(os.path.join(scriptTool.getScriptPath(), 'icons', 'futil_cancle')), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.btn_Cancle.setIcon(icon2)
         self.btn_Cancle.setIconSize(QtCore.QSize(15, 15))
         self.horizontalLayout.addWidget(self.btn_Cancle)
         QtCore.QObject.connect(self.btn_Cancle, QtCore.SIGNAL('clicked()'), Dialog.reject)
     #--+--+--+--+
     self.verticalLayout.addLayout(self.horizontalLayout)
     #--+--+--+--+
     QtCore.QMetaObject.connectSlotsByName(Dialog)
Beispiel #2
0
 def setupUi(self, Dialog):
     Dialog.setWindowTitle('Warning !!!')
     Dialog.setObjectName('Dialog')
     Dialog.resize(200, 150)
     #--+--+--+--+
     self.verticalLayout = QtGui.QVBoxLayout(Dialog)
     self.verticalLayout.setContentsMargins(-1, 0, -1, -1)
     #--+--+--+--+
     self.btn_title = QtGui.QPushButton(Dialog)
     self.btn_title.setEnabled(False)
     self.btn_title.setStyleSheet('background-color: rgba(0, 0, 0, 0);')
     
     icon = QtGui.QIcon()
     image_name = {'e':'futil_error.png', 'w':'futil_warning.png'}.get(self.waringType, 'futil_ask.png')
     title_image = os.path.join(scriptTool.getScriptPath(), 'icons', image_name)
     icon.addPixmap(QtGui.QPixmap(title_image), QtGui.QIcon.Disabled, QtGui.QIcon.Off)
     
     self.btn_title.setIcon(icon)
     self.btn_title.setIconSize(QtCore.QSize(35, 35))
     self.verticalLayout.addWidget(self.btn_title)
     #--+--+--+--+
     self.label = QtGui.QLabel('? ? ?', Dialog)
     font = QtGui.QFont()
     font.setPointSize(11)
     self.label.setFont(font)
     self.label.setAlignment(QtCore.Qt.AlignCenter)
     self.label.setObjectName('label')
     self.verticalLayout.addWidget(self.label)
     self.verticalLayout.addItem(QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding))
     #--+--+--+--+
     self.horizontalLayout = QtGui.QHBoxLayout()
     self.horizontalLayout.setSpacing(3)
     self.horizontalLayout.addItem(QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum))
     #--+--+--+--+
     self.btn_OK = QtGui.QPushButton('OK', Dialog)
     self.btn_OK.setMinimumSize(QtCore.QSize(100, 25))
     icon1 = QtGui.QIcon()
     icon1.addPixmap(QtGui.QPixmap(os.path.join(scriptTool.getScriptPath(), 'icons', 'futil_ok')), QtGui.QIcon.Normal, QtGui.QIcon.Off)
     self.btn_OK.setIcon(icon1)
     self.btn_OK.setIconSize(QtCore.QSize(22, 22))
     self.horizontalLayout.addWidget(self.btn_OK)
     QtCore.QObject.connect(self.btn_OK,     QtCore.SIGNAL('clicked()'), Dialog.accept)
     #--+--+--+--+
     if self.waringType != 'e':
         self.btn_Cancle = QtGui.QPushButton('Cancle', Dialog)
         self.btn_Cancle.setMinimumSize(QtCore.QSize(100, 25))
         icon2 = QtGui.QIcon()
         icon2.addPixmap(QtGui.QPixmap(os.path.join(scriptTool.getScriptPath(), 'icons', 'futil_cancle')), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.btn_Cancle.setIcon(icon2)
         self.btn_Cancle.setIconSize(QtCore.QSize(15, 15))
         self.horizontalLayout.addWidget(self.btn_Cancle)
         QtCore.QObject.connect(self.btn_Cancle, QtCore.SIGNAL('clicked()'), Dialog.reject)
     #--+--+--+--+
     self.verticalLayout.addLayout(self.horizontalLayout)
     #--+--+--+--+
     QtCore.QMetaObject.connectSlotsByName(Dialog)
Beispiel #3
0
    ],
    'MAYA_PLUG_IN_PATH': []
}

MAYA_BAT_PATH = {
    "MAYA_MODULE_PATH": [
        "{}/Maya/modules/yeti/2018/Yeti3.0.3".format(basePath),
        "{}/Maya/modules/MCLShelf/MCLShelf1.0".format(basePath),
        "{}/Maya/modules/mtoadeploy/2018/mtoa3.1.0".format(basePath),
        "{}/Maya/modules/SHAPESBrush/2018/SHAPESBrush1.0".format(basePath),
        "{}/Maya/modules/TheSetupMachine/TSM3".format(basePath),
        "{}/Maya/modules/zMappedWrapDeformer".format(basePath),
        "{}/Maya/modules/ngskintools/Contents".format(basePath),
    ],
    'PYTHONPATH': [
        scriptTool.getScriptPath(),
        '{}/Maya/Python/2.7/Lib/site-packages'.format(basePath),
        '{}/Maya/Tools'.format(basePath), '{}/Maya/Scritps'.format(basePath)
    ],
}
MAYA_LOCATION = """
"D:/Program Files/Autodesk/Maya{0}/bin/maya.exe" -noAutoloadPlugins -command "loadPlugin //"projectConfiguration.py//";projectConf -ls all -lp //"{1}//";"
""".format(MAYA_VERSION, FILENAME)

# --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--#
HOUDINI_VERSION = "17.0.416"
HOUDINIMenu = [{'General': {}}, {'Help': {}}]

HOUDINIToolVariables = {}

HOUDINI_BAT_PATH = {}
Beispiel #4
0
#!/usr/bin/env python
# -*- coding:UTF-8 -*-
# @Time         : 2018/12/9 20:32
# @email        : [email protected]
# @fileName     : 1001_PN_TD.py

# --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--#
import os
import scriptTool
FILENAME = scriptTool.getFile(__file__)
basePath = scriptTool.getScriptPath().replace('\\', '/')

# FILENAME = "1001_PN_TD"
# basePath = '//192.168.0.50/Pipeline/ProjectConfigurations/ProjectConfigurations3.5'
# --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--#
ProjectName = ""
PipelineSoftware = ''
PIPELINE_SOFTWARE = 'mantis'
Softwares = ['MAYA', 'HOUDINI', 'SUBSTANCEPANTER', 'PHOTOSHOP']

# --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--#
FPS = 24
UNIT = 'cm'
Renderer = 'arnold5.3'

# clarisse ---+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--#
CLARISSE_VERSION = 4.0

CLARISSE_BAT_PATH = {}

CLARISSE_LOCATION = """
                         '{}/Maya/Tools/LDV'.format(basePath),
                         '{}/Maya/Tools/LGT'.format(basePath),
                         '{}/Maya/Tools/MOD'.format(basePath),
                         '{}/Maya/Tools/RIG'.format(basePath),
                         '{}/Maya/Tools/TRK'.format(basePath),

                         ],
    'MAYA_PLUG_IN_PATH': []
}

MAYA_BAT_PATH = {"MAYA_MODULE_PATH": ["{}/Maya/modules/MCLShelf/MCLShelf1.0".format(basePath),
                                      "{}/Maya/modules/SHAPESBrush/2017/SHAPESBrush1.0".format(basePath),
                                      "{}/Maya/modules/TheSetupMachine/TSM3".format(basePath),
                                      "{}/Maya/modules/MCLRig/MCLRig1.0".format(basePath),
                                      ],
                 'PYTHONPATH': [scriptTool.getScriptPath(),
                                '{}/Maya/Python/2.7/Lib/site-packages'.format(basePath),
                                '{}/Maya/Tools'.format(basePath),
                                '{}/Maya/Scritps'.format(basePath)],

                 }
MAYA_LOCATION = """
"D:/Program Files/Autodesk/Maya{0}/bin/maya.exe" -noAutoloadPlugins -command "loadPlugin //"projectConfiguration.py//";projectConf -ls all -lp //"{1}//";"
""".format(MAYA_VERSION, FILENAME)

# --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--#
HOUDINI_VERSION = "17.0.416"
HOUDINIMenu = [{'General': {}},
               {'Help': {}}]

HOUDINIToolVariables = {
Beispiel #6
0
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Time      :  14:40
# Email     : [email protected]
# File      : openUI.py
__author__ = 'ChenLiang.Miao'
# import --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ #
import os
import existsUI as exUI
import scriptTool
reload(exUI)
# function +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ #

maya_win = exUI.GetMayaMainWindow()
__abs_path__ = scriptTool.getScriptPath().replace('\\', '/')
main_win_name = 'tool name'
scriptVersion = 'version by author'


def icon_path(in_name):
    # return in_name
    return os.path.join(os.path.dirname(__abs_path__), 'icons',
                        in_name).replace('\\', '/')


def getUIPath():
    return os.path.join(__abs_path__, 'UIName.ui').replace('\\', '/')


# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ #
windowClss, baseClass = exUI.loadUi(getUIPath())