Пример #1
0
def doExportUICall(assetName, cacheGrp, exportPath):

    logger.debug('Copying attribute ...')
    copyAttr(assetName)
    logger.debug('Done')

    logger.debug('exporting alembic ...')
    exportFilePath = '%s/%s.abc' % (exportPath, assetName)
    abcUtils.exportABC('%s' % (cacheGrp), exportFilePath)
    logger.debug('export done')

    logger.debug('exporting data ...')
    exportData(assetName, exportFilePath)
    logger.debug('export data done')

    return exportFilePath
Пример #2
0
def doExportUICall(assetName, cacheGrp, exportPath) : 

	logger.debug('Copying attribute ...') 
	copyAttr(assetName)
	logger.debug('Done')

	logger.debug('exporting alembic ...')
	exportFilePath = '%s/%s.abc' % (exportPath, assetName)
	abcUtils.exportABC('%s' % (cacheGrp), exportFilePath)
	logger.debug('export done')

	logger.debug('exporting data ...')
	exportData(assetName, exportFilePath)
	logger.debug('export data done')

	return exportFilePath
Пример #3
0
def exportABC(asset):
    mc.loadPlugin("C:/Program Files/Autodesk/Maya2015/bin/plug-ins/AbcImport.mll", qt=True)
    from tool.ptAlembic import abcUtils

    reload(abcUtils)

    ctrl = setting.superRootCtrl
    geoGrp = setting.exportGrp

    # get publish maya file
    pubMayaFile = asset.publishFile()

    # replace to yml
    abcFile = pubMayaFile.replace(".ma", ".abc")
    abcDir = asset.rigDataPath("abc")
    abcFileName = "%s/%s" % (abcDir, os.path.basename(abcFile))

    if not os.path.exists(abcDir):
        os.makedirs(abcDir)

    if not os.path.exists(os.path.dirname(abcFile)):
        os.makedirs(os.path.dirname(abcFile))

    if mc.objExists(ctrl):
        start = mc.playbackOptions(q=True, min=True)
        end = mc.playbackOptions(q=True, max=True)

        # set animation
        setTurnAnimation(ctrl)

        # export abc
        result = abcUtils.exportABC(geoGrp, abcFile)

        if os.path.exists(abcFile):
            # copy to work area
            copyResult = fileUtils.copy(abcFile, abcFileName)

            # remove key
        removeKey(ctrl, start, end)
        status = False

        if os.path.exists(abcFile):
            status = True

        return {"Export abc": {"status": status, "message": result, "hero": result}}
Пример #4
0
def exportABCCmd(abcFile) : 
    mc.loadPlugin("C:/Program Files/Autodesk/Maya2015/bin/plug-ins/AbcImport.mll", qt = True)

    ctrl = setting.superRootCtrl
    geoGrp = setting.exportGrp

    if mc.objExists(ctrl) : 
        start = mc.playbackOptions(q = True, min = True)
        end = mc.playbackOptions(q = True, max = True)

        # set animation 
        rig.setTurnAnimation(ctrl)

        # export abc
        result = abcUtils.exportABC(geoGrp, abcFile)

        # remove key
        rig.removeKey(ctrl, start, end)
        status = False 

        if os.path.exists(abcFile) : 
            status = True

        return status
Пример #5
0
def export(assetName, exportPath):
    # exportPath = 'C:/Users/TA/Documents/maya/projects/default/cache/alembic/frd_andreaSchool_v001.abc'
    abcUtils.exportABC('%s:%s' % (assetName, exportGrp), exportPath)

    return True
Пример #6
0
def export(assetName, exportPath) : 
	# exportPath = 'C:/Users/TA/Documents/maya/projects/default/cache/alembic/frd_andreaSchool_v001.abc'
	abcUtils.exportABC('%s:%s' % (assetName, exportGrp), exportPath)

	return True