Esempio n. 1
0
	def doParse(self, inStream, length, parent):
		count = readU32(inStream)
		self.data['sequences'] = []
		for i in range (0, count):
			seq = {}
			seq['name'] = readString(inStream)
			seq['start'] = readU16(inStream)
			seq['end'] = readU16(inStream)
			self.data['sequences'].append(seq)
Esempio n. 2
0
	def readHeaderEndV3(self, inStream):
		frameCount = readU16(inStream)
		frameSize = readRect(inStream)
		pivot = readVec(inStream)

		h = self._context['header']
		h['frameCount'] = frameCount
		h['frameSize'] = frameSize
		h['pivot'] = pivot
		self._context['header'] = h
Esempio n. 3
0
def readTag(inStream, parent, context):
	tagId = readU16(inStream)
	#print("TagId = {0}".format(tagId))
	tag = Tag(context)
	try:
		tag = TagList[tagId](context)
		#print type(tag)
	except KeyError:
		print("GAF format warning. Unknonwn tag with number {0}".format(tagId))
	tag.parse(inStream, parent)
	parent.append({'name': tag.type(), 'content': tag.data})
	return tag
Esempio n. 4
0
	def doParse(self, inStream, length, parent):
		masksCount = readU32(inStream)
		masks = []
		for i in range(0, masksCount):
			mask = {}
			mask['objectId'] = readU32(inStream)
			mask['elementAtlasIdRef'] = readU32(inStream)
			objectType = 0
			if self.version() >= 4:
				objectType = readU16(inStream)
			mask['objectType'] = objectType
			masks.append(mask)
		self._data['masks'] = masks
Esempio n. 5
0
	def doParse(self, inStream, length, parent):
		c = self._data
		count = readU32(inStream)
		c["objectsCount"] = count
		objects = []
		while count:
			obj = {}
			objectId = readU32(inStream)
			obj["id"] = objectId
			atlasIdRef = readU32(inStream)
			obj['atlasIdRef'] = atlasIdRef
			if self.version() >= 4:
				objType = readU16(inStream)
				obj['type'] = objType
			objects.append(obj)
			count -= 1
		c["objects"] = objects
		self._data = c
Esempio n. 6
0
	def doParse(self, inStream, length, parent):
		self.data['fps'] = readU8(inStream)
		self.data['color'] = readColor(inStream)
		self.data['width'] = readU16(inStream)
		self.data['height'] = readU16(inStream)