Beispiel #1
0
	def status(self):
		"""return an array with the status of the files in the asset,
		return:
			0  : 0k file
			1  : updated
			2  : not Updated
			3  : not exists"""
		depFiles = [
				[dp.Node( self.modelPath   ),[]],
				[dp.Node( self.shadingPath ),[ 0 ]],
				[dp.Node( self.hairPath    ),[ 0 ]],
				[dp.Node( self.rigPath     ),[ 1, 2 ]],
				[dp.Node( self.finalPath   ),[ 1, 2, 3 ]]
				]
		res = dp.dep_resolvedArray( depFiles )
		result = []
		for i,f in enumerate( depFiles ):
			value = 1
			if not f[0].name.exists:
				value = 3
			elif f[0].name.isZero:
				value = 0
			else:
				for deps in res[i][1]:
					if not deps.name.exists:
						continue
					elif deps.name.isZero:
						continue
					isOlder = f[0].name.isOlderThan( deps.name )
					if isOlder:
						value = 2
						break
			result.append( value )
		return result
Beispiel #2
0
	def status(self):
		"""return an array with the status of the files in the shot,
		return:
			0  : 0k file
			1  : updated
			2  : not Updated
			3  : not exists"""
		depFiles = [
				[dp.Node( self.layPath      ),[]],
				[dp.Node( self.animPath     ),[ 0 ]],
				[dp.Node( self.skinFixPath  ),[ 1 ]],
				[dp.Node( self.hrsPath      ),[ 1 ]],
				[dp.Node( self.vfxPath      ),[ 1 ]],
				[dp.Node( self.simPath      ),[ 1 ]],
				[dp.Node( self.litPath      ),[ 1, 2, 3, 4, 5 ]],
				[dp.Node( self.compPath     ),[ 6 ]]
				]
		res = dp.dep_resolvedArray( depFiles )
		result = []
		for i,f in enumerate( depFiles ):
			value = 1
			if not f[0].name.exists:
				value = 3
			elif f[0].name.isZero:
				value = 0
			else:
				for deps in res[i][1]:
					if not deps.name.exists:
						continue
					elif deps.name.isZero:
						continue
					isOlder = f[0].name.isOlderThan( deps.name )
					if isOlder:
						value = 2
						break
			result.append( value )
		return result