Esempio n. 1
0

from functools import partial
from startup import config
from rftool.utils import sg_process
from rftool.utils import get_config
from rftool.utils import file_utils
from rftool.utils import maya_utils
from rftool.utils import asm_utils
from rftool.utils import icon

from rftool.utils import log_utils
from rftool.utils.ui import load
import logging 

logFile = log_utils.name('asset_loader', user=getpass.getuser())
logger = log_utils.init_logger(logFile)

logger.setLevel(logging.INFO)


os.environ['QT_PREFERRED_BINDING'] = os.pathsep.join(['PySide', 'PySide2'])
from Qt import wrapInstance
from Qt import QtCore
from Qt import QtWidgets
from Qt import QtGui


module_path = sys.modules[__name__].__file__
module_dir  = os.path.dirname(module_path)
Esempio n. 2
0
from rftool.utils import log_utils
from rftool.utils.ui import load
from rftool.fix.polytag import polytag_core
reload(polytag_core)


class Name:
    ui = 'AssetSwitchUI'
    logname = 'AssetSwitchPolyTag'
    title = 'Asset Switch UI'


moduleDir = os.path.dirname(sys.modules[__name__].__file__)
user = os.environ.get('RFUSER', 'unknown')

logFile = log_utils.name(Name.logname, user=user)
logger = log_utils.init_logger(logFile)
logger.setLevel(logging.INFO)


# If inside Maya open Maya GUI
def getMayaWindow():
    ptr = mui.MQtUtil.mainWindow()
    return wrapInstance(long(ptr), QtWidgets.QWidget)
    # return sip.wrapinstance(long(ptr), QObject)


def show():
    deleteUI(Name.ui)
    myApp = SGFileManager(getMayaWindow())
    # myApp.ui.show()
Esempio n. 3
0
    qtPath = '%s/lib/Qt.py' % os.environ['RFSCRIPT']
    appendPaths = [packagePath, toolPath, corePath, qtPath]

    # add PySide lib path
    for path in appendPaths:
        if not path in sys.path:
            sys.path.append(path)

    from startup import setEnv
    setEnv.set()

from rftool.utils import log_utils
reload(log_utils)
from rftool.utils.ui import load

logFile = log_utils.name('split_tool', user=getpass.getuser())
logger = log_utils.init_logger(logFile)

from Qt import wrapInstance
from Qt import QtCore
from Qt import QtWidgets
from Qt import QtGui
from Qt import _QtUiTools as QtUiTools
#Import GUI
# from PySide import QtCore
# from PySide import QtGui
# from PySide import QtUiTools
# import ui

from functools import partial
Esempio n. 4
0
    appendPaths = [packagePath, toolPath, corePath, qtPath]

    # add PySide lib path
    for path in appendPaths:
        if not path in sys.path:
            sys.path.append(path)

    from startup import setEnv
    reload(setEnv)
    setEnv.set()

from rftool.utils import log_utils
reload(log_utils)
from rftool.utils.ui import load

logFile = log_utils.name('still_publish_tool', user=getpass.getuser())
logger = log_utils.init_logger(logFile)
logger.setLevel(logging.INFO)

os.environ['QT_PREFERRED_BINDING'] = os.pathsep.join(['PySide', 'PySide2'])
from Qt import wrapInstance
from Qt import QtCore
from Qt import QtWidgets
from Qt import QtGui

#Import GUI
# from PySide import QtCore
# from PySide import QtGui
# import ui

from functools import partial
Esempio n. 5
0
    reload(setEnv)
    setEnv.set()

from rftool.utils import log_utils
from rftool.utils import maya_utils
from rftool.utils import pipeline_utils
from rftool.utils import path_info
from rftool.utils import sg_process
from startup import config
import maya_hook as hook
reload(hook)

reload(maya_utils)
reload(config)

logFile = log_utils.name('split_shot_layout', user=getpass.getuser())
logger = log_utils.init_logger(logFile)


def shiftShot(shotName):
    """ split only shotName """
    # assume that startFrame and sequenceStartFrame are the same
    startFrame = mc.getAttr('%s.startFrame' % shotName)
    endFrame = mc.getAttr('%s.endFrame' % shotName)
    duration = endFrame - startFrame + 1
    shiftFrameCount = config.shotStartFrame - startFrame

    if not shiftFrameCount == 0:
        maya_utils.shiftKey(frame=shiftFrameCount)
        logger.info('Shift key %s frames success' % shiftFrameCount)