Пример #1
0
def go():
    try:
        assetName, assetType, version = geo.decodeFileName()
    except IndexError:
        showErrorDialog()
        return

    if not assetType == 'animation':
        showErrorDialog()
        return

    fileName = mc.file(q=True, sceneName=True)
    dirName = os.path.dirname(fileName)
    source = amu.getCheckinDest(dirName)
    blastPath = os.path.join(os.path.dirname(source), 'playblasts')
    versionNum = amu.getLatestVersion(source) + 1
    name = os.path.join(blastPath, assetName + "_v" + ("%03d" % versionNum))

    startFrame = mc.playbackOptions(q=True, min=True)
    endFrame = mc.playbackOptions(q=True, max=True)

    choice = mc.confirmDialog(title='Playblast Tool',
                              message='What kind of playblast?',
                              button=['Cancel', 'GL', 'Simple'],
                              defaultButton='Simple',
                              cancelButton='Cancel',
                              dismissString='Cancel')
    if choice == 'Simple':
        simpleBlast(name, startFrame, endFrame)
    elif choice == 'GL':
        glBlast(name, startFrame, endFrame)
def go():
    try:
        assetName, assetType, version = geo.decodeFileName()
    except IndexError:
        showErrorDialog()
        return

    if not assetType == 'animation':
        showErrorDialog()
        return

    fileName = mc.file(q=True, sceneName=True)
    dirName = os.path.dirname(fileName)
    source = amu.getCheckinDest(dirName)
    blastPath = os.path.join(os.path.dirname(source), 'playblasts')
    versionNum = amu.getLatestVersion(source)+1
    name = os.path.join(blastPath, assetName+"_v"+("%03d" % versionNum))

    startFrame = mc.playbackOptions(q=True, min=True)
    endFrame = mc.playbackOptions(q=True, max=True)

    choice = mc.confirmDialog( title = 'Playblast Tool'
                              , message       = 'What kind of playblast?'
                              , button        = ['Cancel', 'GL', 'Simple']
                              , defaultButton = 'Simple'
                              , cancelButton  = 'Cancel'
                              , dismissString = 'Cancel')
    if choice == 'Simple':
        simpleBlast(name, startFrame, endFrame)
    elif choice == 'GL':
        glBlast(name, startFrame, endFrame)
Пример #3
0
def go():
    try:
        assetName, assetType, version = geo.decodeFileName()
    except IndexError:
        showErrorDialog()
        return

    if not assetType == "animation":
        showErrorDialog()
        return

    fileName = mc.file(q=True, sceneName=True)
    dirName = os.path.dirname(fileName)
    source = amu.getCheckinDest(dirName)
    blastPath = os.path.join(os.path.dirname(source), "playblasts")
    name = os.path.join(blastPath, assetName)

    startFrame = mc.playbackOptions(q=True, min=True)
    endFrame = mc.playbackOptions(q=True, max=True)

    choice = mc.confirmDialog(
        title="Playblast Tool",
        message="What kind of playblast?",
        button=["Cancel", "GL", "Simple"],
        defaultButton="Simple",
        cancelButton="Cancel",
        dismissString="Cancel",
    )
    if choice == "Simple":
        simpleBlast(name, startFrame, endFrame)
    elif choice == "GL":
        glBlast(name, startFrame, endFrame)
Пример #4
0
def isModelAsset():
        # unpack decoded entries and check if assetType is a 'model'
        assetName, assetType, version = geo.decodeFileName()
        return assetType == 'model'
Пример #5
0
def isAnimationAsset():
        # unpack decoded entries and check if assetType is a 'rig'
        assetName, assetType, version = geo.decodeFileName()
        return assetType == 'animation'
Пример #6
0
def checkAssetType(givenType):
    # unpack decoded entries and check if the asset type matches what was passed in.
    """ precondition: givenType is either 'model', 'rig', or 'animation' """
    assetName, assetType, version = geo.decodeFileName()
    return assetType == givenType
def isAnimationAsset():
    # unpack decoded entries and check if assetType is a 'rig'
    assetName, assetType, version = geo.decodeFileName()
    return assetType == 'animation'
def isModelAsset():
    # unpack decoded entries and check if assetType is a 'model'
    assetName, assetType, version = geo.decodeFileName()
    return assetType == 'model'
Пример #9
0
def checkAssetType(givenType):
    # unpack decoded entries and check if the asset type matches what was passed in.
    """ precondition: givenType is either 'model', 'rig', or 'animation' """
    assetName, assetType, version = geo.decodeFileName()
    return assetType == givenType