def information_shot(shot_name):
    assets = getShotInfo(shot_name)['assets']
    tasks = getShotInfo(shot_name)['tasks']
    print '#' * 60
    print '-------------shot %s----------------' % shot_name
    print 'FrameRange is {}-{}'.format(getShotInfo(shot_name)['sg_cut_in'], getShotInfo(shot_name)['sg_cut_out'])
    print 'Shotgun Asset num is ', len(assets)
    print 'Asset Content:'
    for x in assets:
        asset_sg=getAssetInfor(x['name'])
        CNInfo = asset_sg['sg_asset_name__cn']
        if CNInfo:
            cnName = CNInfo.decode('utf-8')
        else:
            cnName = None

        print '   [', x['name'], '] NameCn :', cnName, ' AssetType : <', Asset_type_cn[asset_sg['sg_asset_type']], '>'
        assetTaskInfor = asset_sg['tasks']
        if assetTaskInfor:
            for assettask in assetTaskInfor:
                if assettask['name'].endswith('_mdl') or assettask['name'].endswith('_rig') or assettask[
                    'name'].endswith('_shd'):
                    asset_task_sg =getTaskInfor(assettask['name'])
                    assetTaskAssignto = asset_task_sg['task_assignees']
                    assetTaskStatus = asset_task_sg['sg_status_list']

                    if assetTaskAssignto:
                        assetTaskUser = assetTaskAssignto[0]['name'].decode('utf-8')
                    else:
                        assetTaskUser = None
                    print ' ' * 15, '<{}>:'.format(assettask['name']), 'Status:['+Status_cn[assetTaskStatus]+']',assetTaskUser

    print 'Task Information:'
    for x in tasks:
        shot_task_sg =getTaskInfor(x['name'])
        assignto = shot_task_sg['task_assignees']
        if assignto:
            user_name = assignto[0]['name'].decode('utf-8')
        else:
            user_name = None
        shotTaskStatus =shot_task_sg['sg_status_list']
        print '   [', x['name'], '] Status:['+Status_cn[shotTaskStatus] +'] AssignTo : <', user_name, '>'
    print '#' * 60
    mc.ScriptEditor()
예제 #2
0
파일: window.py 프로젝트: tccoleman/rush
 def _scriptEditor(self):
     cmds.ScriptEditor()
예제 #3
0
def script(*args):
	cmds.ScriptEditor()
 def cmdWnd(arg=None):
     cmds.ScriptEditor()
     highlightCmdReporter()
예제 #5
0
def scriptEditorWindow():
    cmds.ScriptEditor()
예제 #6
0
 def _scriptEditorWindow(self):
     cmds.ScriptEditor()
import sys
import maya.cmds as cmds
utils = sys.modules['maya.utils']
script_name = "script_name"

class Except():
	"""
	Exception class
	"""
    def excepthook(self, tb_type, exc_object, tb, detail=2):
		"""
		Exception hook override for maya
		"""
        print utils.formatGuiException(tb_type, exc_object, tb, detail)
        cmds.ScriptEditor()
        errormsg = utils.formatGuiException(tb_type, exc_object, tb, detail)
        result = cmds.promptDialog(
                        title='Oh no a crash!',
                        message='Send feedback to devs:',
                        button=['OK', 'Cancel'],
                        defaultButton='OK',
                        cancelButton='Cancel',
                        dismissString='Ok')

        if result == 'OK':
            text = cmds.promptDialog(query=True, text=True)

        import sentry_sdk
        sentry_sdk.init(SENTRY_URL_HERE)
        sentry_sdk.capture_message(self.script_name + ' -- User feedback: ' + str(text) + " -- Error: " + errormsg)