Exemple #1
0
def getShot(increment):
    # return cache path
    # Result: P:/Lego_Friends2015/film/LEGO_FRIENDS_EPTEST/q0010/s0010/anim/scenes/work/frd_eptest_q0010_s0010_anim_v001.ma #
    info = setting.getSceneInfo()

    if info:
        cachePath = info['cachePath']

        return cachePath
Exemple #2
0
def getShot(increment) : 
	# return cache path 
	# Result: P:/Lego_Friends2015/film/LEGO_FRIENDS_EPTEST/q0010/s0010/anim/scenes/work/frd_eptest_q0010_s0010_anim_v001.ma # 
	info = setting.getSceneInfo()

	if info : 
		cachePath = info['cachePath']
			
		return cachePath 
Exemple #3
0
def exportData(assetName, exportPath):
    info = setting.cachePathInfo()
    configData = dict()
    sceneInfo = setting.getSceneInfo()
    dept = sceneInfo['department']

    if info:
        if exportDept == dept:
            cachePath = info['cacheInfoPath']
            shadeFile = str(getShaderPath(assetName)['shadeFile'])
            shadeDataFile = str(getShaderPath(assetName)['dataFile'])
            assetPath = str(getShaderPath(assetName)['assetFile'])
            cacheGrp = str('%s:%s' % (assetName, exportGrp))
            assetDataPath = info['assetDataPath']

            if os.path.exists(cachePath):
                config = open(cachePath, 'r')
                configData = yaml.load(config)

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

            print os.path.dirname(cachePath)

            fileInfo = open(cachePath, 'w')

            configData.update({
                str(assetName): {
                    'shadeFile': shadeFile,
                    'shadeDataFile': shadeDataFile,
                    'cachePath': str(exportPath),
                    'assetPath': assetPath,
                    'cacheGrp': cacheGrp
                }
            })

            result = yaml.dump(configData, fileInfo, default_flow_style=False)

            # export asset hierarchy
            if not os.path.exists(assetDataPath):
                os.makedirs(assetDataPath)

            # export asset data
            dataPath = '%s/%s.yml' % (assetDataPath, assetName)
            pipelineTools.exportHierarchyData(cacheGrp, dataPath)
            print dataPath
Exemple #4
0
def exportData(assetName, exportPath) : 
	info = setting.cachePathInfo()
	configData = dict()
	sceneInfo = setting.getSceneInfo()
	dept = sceneInfo['department']

	if info : 
		if exportDept == dept : 
			cachePath = info['cacheInfoPath']
			shadeFile = str(getShaderPath(assetName)['shadeFile'])
			shadeDataFile = str(getShaderPath(assetName)['dataFile'])
			assetPath = str(getShaderPath(assetName)['assetFile'])
			cacheGrp = str('%s:%s' % (assetName, exportGrp))
			assetDataPath = info['assetDataPath']

			if os.path.exists(cachePath) : 
				config = open(cachePath, 'r')
				configData = yaml.load(config)

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

			print os.path.dirname(cachePath)

			fileInfo = open(cachePath, 'w')
				
			configData.update({str(assetName): {'shadeFile': shadeFile, 'shadeDataFile': shadeDataFile, 'cachePath': str(exportPath), 'assetPath': assetPath, 'cacheGrp': cacheGrp}})

			result = yaml.dump(configData, fileInfo, default_flow_style = False)

			# export asset hierarchy
			if not os.path.exists(assetDataPath) : 
				os.makedirs(assetDataPath)

			# export asset data
			dataPath = '%s/%s.yml' % (assetDataPath, assetName)
			pipelineTools.exportHierarchyData(cacheGrp, dataPath)
			print dataPath
Exemple #5
0
def getSceneInfo():
    return setting.getSceneInfo()
Exemple #6
0
def getSceneInfo() : 
	return setting.getSceneInfo()