Ejemplo n.º 1
0
 def set_defaults(self):
     self.rotation = Matrix33(self.context, None, None)
     self.offset = Vector3(self.context, None, None)
     self.unk_1 = numpy.zeros((3, 2), dtype='ushort')
     self.vertex_count = 0
     self.tri_count = 0
     self.bounds_min = Vector3(self.context, None, None)
     self.bounds_max = Vector3(self.context, None, None)
     self.ones_or_zeros = numpy.zeros((7), dtype='uint64')
     if self.context.version <= 32:
         self.ff_or_zero = numpy.zeros((10), dtype='int')
     if self.context.version >= 47:
         self.ff_or_zero = numpy.zeros((8), dtype='int')
     if self.context.version <= 32:
         self.bounds_min_repeat = Vector3(self.context, None, None)
     if self.context.version <= 32:
         self.bounds_max_repeat = Vector3(self.context, None, None)
     if self.context.version <= 32:
         self.tri_flags_count = 0
     if self.context.version <= 32:
         self.count_bits = 0
     if self.context.version <= 32:
         self.stuff = numpy.zeros((9), dtype='ushort')
     if self.context.version <= 32:
         self.collision_bits = Array(self.context)
     if self.context.version <= 32:
         self.zeros = numpy.zeros((4), dtype='uint')
     self.vertices = numpy.zeros((self.vertex_count, 3), dtype='float')
     self.triangles = numpy.zeros((self.tri_count, 3), dtype='ushort')
     if self.context.version <= 32:
         self.const = 0
     if self.context.version <= 32 and self.const:
         self.triangle_flags = numpy.zeros((self.tri_flags_count),
                                           dtype='uint')
     self.zero_end = 0
Ejemplo n.º 2
0
    def __init__(self, arg=None, template=None):
        self.name = ''
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0
        self.unk_vec_a = Vector3()
        self.unk_float_a = 0
        self.unk_vec_b = Vector3()

        # scale: pack_offset / 512, also added as offset
        self.pack_offset = 0

        # always?
        self.zero_a = 0
        self.unk_float_b = 0
        self.unknownvectors = Array()
        self.unk_float_0 = 0
        self.unk_float_1 = 0

        # PZ only
        self.unk_vec_a_repeat = Vector3()

        # PZ only
        self.unk_vec_b_repeat = Vector3()
        self.mat_count = 0
        self.lod_count = 0
        self.mat_1_count = 0

        # count of modeldata fragments for the mdl2 this struct refers to
        self.model_count = 0
        self.last_count = 0
        self.unk_0 = 0
        self.unk_1 = 0
        self.pad = Array()
Ejemplo n.º 3
0
	def __init__(self, arg=None, template=None):
		self.arg = arg
		self.template = template
		self.io_size = 0
		self.io_start = 0
		self.a = Vector3()
		self.b = Vector3()
		self.c = Vector3()
Ejemplo n.º 4
0
	def __init__(self, arg=None, template=None):
		self.name = ''
		self.arg = arg
		self.template = template
		self.io_size = 0
		self.io_start = 0
		self.rotation = Matrix33()
		self.center = Vector3()
		self.extent = Vector3()
Ejemplo n.º 5
0
 def set_defaults(self):
     if self.context.version <= 47:
         self.loc = Vector3(self.context, None, None)
     if self.context.version <= 47:
         self.scale = 0
     if self.context.version <= 47:
         self.rot = Vector4(self.context, None, None)
     if self.context.version >= 48:
         self.rot = Vector4(self.context, None, None)
     if self.context.version >= 48:
         self.loc = Vector3(self.context, None, None)
     if self.context.version >= 48:
         self.scale = 0
Ejemplo n.º 6
0
 def __init__(self, context, arg=None, template=None):
     self.name = ''
     self._context = context
     self.arg = arg
     self.template = template
     self.io_size = 0
     self.io_start = 0
     self.loc = Vector3(self.context, None, None)
     self.scale = 0
     self.rot = Vector4(self.context, None, None)
     self.rot = Vector4(self.context, None, None)
     self.loc = Vector3(self.context, None, None)
     self.scale = 0
     self.set_defaults()
Ejemplo n.º 7
0
    def __init__(self, arg=None, template=None):
        self.name = ''
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0

        # the smallest coordinates across all axes
        self.bounds_min = Vector3()

        # not sure
        self.unk_float_a = 0

        # the biggest coordinates across all axes
        self.bounds_max = Vector3()

        # scale: pack_offset / 512, also added as offset
        self.pack_offset = 0

        # cog? medium of bounds?
        self.center = Vector3()

        # probably from center to max
        self.radius = 0

        # PZ only, zero-ish
        self.unknowns = numpy.zeros((4), dtype='float')

        # verbatim repeat
        self.bounds_min_repeat = Vector3()

        # verbatim repeat
        self.bounds_max_repeat = Vector3()
        self.num_materials = 0
        self.num_lods = 0
        self.num_objects = 0

        # count of modeldata fragments for the mdl2 this struct refers to
        self.num_models = 0

        # ?
        self.last_count = 0

        # nonzero in PZ flamingo, ZT african ele female
        self.another_count = 0

        # ?
        self.unks = numpy.zeros((7), dtype='ushort')
        self.pad = numpy.zeros((3), dtype='ushort')
Ejemplo n.º 8
0
    def __init__(self, context, arg=None, template=None):
        self.name = ''
        self._context = context
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0

        # 1 for carch and nasuto
        self.one = 0

        # center of the collider
        self.loc = Vector3(self.context, None, None)

        # -1 for PZ, 80 for JWE
        self.constant = 0

        # ?
        self.a = 0

        # ?
        self.floats = numpy.zeros((4), dtype='float')

        # sometimes repeat of a
        self.a_2 = 0
        self.set_defaults()
	def __init__(self, arg=None, template=None):
		self.arg = arg
		self.template = template
		self.io_size = 0
		self.io_start = 0
		self.matrix = Matrix33()
		self.vector = Vector3()
Ejemplo n.º 10
0
    def __init__(self, arg=None, template=None):
        self.name = ''
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0
        self.rotation = Matrix33()

        # center of the box
        self.center = Vector3()

        # total width
        self.extent = Vector3()

        # probably padding
        self.zeros = numpy.zeros((3), dtype='uint')
Ejemplo n.º 11
0
 def set_defaults(self):
     self.one = 0
     self.loc = Vector3(self.context, None, None)
     self.constant = 0
     self.a = 0
     self.floats = numpy.zeros((4), dtype='float')
     self.a_2 = 0
Ejemplo n.º 12
0
 def __init__(self, arg=None, template=None):
     self.arg = arg
     self.template = template
     self.io_size = 0
     self.io_start = 0
     self.loc = Vector3()
     self.scale = 0
     self.rot = Vector4()
Ejemplo n.º 13
0
	def __init__(self, arg=None, template=None):
		self.name = ''
		self.arg = arg
		self.template = template
		self.io_size = 0
		self.io_start = 0
		self.center = Vector3()
		self.radius = 0
		self.unk = 0
Ejemplo n.º 14
0
 def set_defaults(self):
     self.vertex_count = 0
     self.rotation = Matrix33(self.context, None, None)
     self.offset = Vector3(self.context, None, None)
     if self.context.version == 32:
         self.zeros = numpy.zeros((5), dtype='uint')
     if ((self.context.version == 48) or
         (self.context.version == 50)) or (self.context.version == 51):
         self.zeros = numpy.zeros((2), dtype='uint')
Ejemplo n.º 15
0
    def __init__(self, context, arg=None, template=None):
        self.name = ''
        super().__init__(context, arg, template)
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0

        # location of the joint
        self.loc = Vector3(self.context, None, None)

        # normalized
        self.direction = Vector3(self.context, None, None)

        # min, le 0
        self.min = 0

        # max, ge 0
        self.max = 0
        self.set_defaults()
Ejemplo n.º 16
0
    def __init__(self, arg=None, template=None):
        self.name = ''
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0

        # relative to the armature, ie. not in bone space
        self.offset = Vector3()

        # normalized
        self.direction = Vector3()

        # radius of the caps
        self.radius = 0

        # distance between the center points of the capsule caps, total extent is 2 * radius + extent
        self.extent = 0

        # apparently unused
        self.zero = 0
Ejemplo n.º 17
0
 def set_defaults(self):
     self.bounds_min = Vector3(self.context, None, None)
     if self.context.version >= 47:
         self.unk_float_a = 0
     self.bounds_max = Vector3(self.context, None, None)
     if self.context.version >= 47:
         self.pack_offset = 0
     self.center = Vector3(self.context, None, None)
     self.radius = 0
     if self.context.version >= 48:
         self.num_lods_2 = 0
     if self.context.version >= 48:
         self.zero = 0
     if self.context.version >= 32:
         self.bounds_min_repeat = Vector3(self.context, None, None)
     if self.context.version >= 32:
         self.bounds_max_repeat = Vector3(self.context, None, None)
     self.num_materials = 0
     self.num_lods = 0
     self.num_objects = 0
     self.num_meshes = 0
     self.last_count = 0
     self.render_flag = RenderFlag()
     self.unks = numpy.zeros((7), dtype='ushort')
     self.pad = numpy.zeros((3), dtype='ushort')
     self.materials_ptr = 0
     self.lods_ptr = 0
     self.objects_ptr = 0
     self.models_ptr = 0
     self.first_materials_ptr = 0
     if self.context.version == 13:
         self.zeros_ztuac = numpy.zeros((4), dtype='uint64')
     self.increment_flag = 0
     self.zero_0 = 0
     if not (self.context.version == 32):
         self.zero_1 = 0
     if self.context.version >= 47:
         self.zero_2 = 0
Ejemplo n.º 18
0
	def __init__(self, context, arg=None, template=None):
		self.name = ''
		self._context = context
		self.arg = arg
		self.template = template
		self.io_size = 0
		self.io_start = 0

		# the rotation of the joint, inverted
		self.rot = Matrix33(self.context, None, None)

		# the location of the joint
		self.loc = Vector3(self.context, None, None)
		self.set_defaults()
Ejemplo n.º 19
0
    def __init__(self, arg=None, template=None):
        self.name = ''
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0

        # center of the sphere
        self.center = Vector3()

        # radius around the center
        self.radius = 0

        # apparently unused
        self.zero = 0
Ejemplo n.º 20
0
	def __init__(self, context, arg=None, template=None):
		self.name = ''
		super().__init__(context, arg, template)
		self.arg = arg
		self.template = template
		self.io_size = 0
		self.io_start = 0

		# the location of the child joint
		self.loc = Vector3(self.context, None, None)

		# each of the vec3 components is normalized, these might represent axes for the angles
		self.floats = numpy.zeros((5, 3), dtype='float')

		# radians
		self.radians = numpy.zeros((8), dtype='float')
		self.set_defaults()
Ejemplo n.º 21
0
    def __init__(self, context, arg=None, template=None):
        self.name = ''
        self._context = context
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0

        # center of the sphere
        self.center = Vector3(self.context, None, None)

        # radius around the center
        self.radius = 0

        # apparently unused
        self.zero = 0
        self.set_defaults()
Ejemplo n.º 22
0
    def __init__(self, arg=None, template=None):
        self.name = ''
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0

        # 16 for anubis: 4 hulls * 16 * 12 (size of vert)
        self.vertex_count = 0
        self.rotation = Matrix33()

        # center of the box
        self.offset = Vector3()

        # probably padding
        self.zeros = numpy.zeros((5), dtype='uint')

        # probably padding
        self.zeros = numpy.zeros((2), dtype='uint')
Ejemplo n.º 23
0
	def __init__(self, arg=None, template=None):
		self.name = ''
		self.arg = arg
		self.template = template
		self.io_size = 0
		self.io_start = 0

		# always zero
		self.zeros = Array()

		# vertex count of model
		self.vertex_count = 0

		# number of index entries in the triangle index list; (not: number of triangles, byte count of tri buffer)
		self.tri_index_count = 0

		# always zero
		self.unknown_05 = 0

		# power of 2 increasing with lod index
		self.poweroftwo = 0

		# byte offset from start of vert buffer (=start of buffer nr 2) in bytes
		self.vertex_offset = 0

		# usually 48
		self.size_of_vertex = 0

		# byte offset from start of tri buffer in bytes
		self.tri_offset = 0

		# always zero
		self.zero = 0

		# some floats
		self.unknown_07 = Vector3()

		# maybe a bitfield; usually in 500 range, e.g 513 (parrot, JWE trees), 517 (stairwell, PZ trees), 529 (driver, PZ terrarium animals)
		self.flag = ModelFlag()
Ejemplo n.º 24
0
 def set_defaults(self):
     self.rotation = Matrix33(self.context, None, None)
     self.center = Vector3(self.context, None, None)
     self.extent = Vector3(self.context, None, None)
     if self.context.version == 32:
         self.zeros = numpy.zeros((3), dtype='uint')
Ejemplo n.º 25
0
	def __init__(self, arg=None, template=None):
		self.name = ''
		self.arg = arg
		self.template = template
		self.io_size = 0
		self.io_start = 0
		self.rotation = Matrix33()

		# offset of mesh
		self.offset = Vector3()

		# not floats, maybe 6 ushorts, shared among (all?) redwoods
		self.unk_1 = numpy.zeros((3, 2), dtype='ushort')

		# vertices (3 float)
		self.vertex_count = 0

		# tris?, counts the 25s at the end
		self.tri_count = 0

		# the smallest coordinates across all axes
		self.bounds_min = Vector3()

		# the biggest coordinates across all axes
		self.bounds_max = Vector3()

		# seemingly fixed
		self.ones_or_zeros = numpy.zeros((7), dtype='uint64')

		# seemingly fixed
		self.ff_or_zero = numpy.zeros((10), dtype='int')

		# verbatim
		self.bounds_min_repeat = Vector3()

		# verbatim
		self.bounds_max_repeat = Vector3()

		# seems to repeat tri_count
		self.tri_flags_count = 0

		# counts MeshCollisionBit
		self.count_bits = 0

		# ?
		self.stuff = numpy.zeros((9), dtype='ushort')

		# ?
		self.collision_bits = Array()

		# always 25
		self.zeros = numpy.zeros((4), dtype='uint')

		# array of vertices
		self.vertices = numpy.zeros((self.vertex_count, 3), dtype='float')

		# triangle indices into vertex list
		self.triangles = numpy.zeros((self.tri_count, 3), dtype='ushort')

		# ?
		self.const = 0

		# always 25
		self.triangle_flags = numpy.zeros((self.tri_flags_count), dtype='uint')

		# might be padding!
		self.zero_end = 0
Ejemplo n.º 26
0
 def set_defaults(self):
     self.center = Vector3(self.context, None, None)
     self.radius = 0
     self.zero = 0
Ejemplo n.º 27
0
	def set_defaults(self):
		self.offset = Vector3(self.context, None, None)
		self.direction = Vector3(self.context, None, None)
		self.radius = 0
		self.extent = 0
		self.zero = 0
Ejemplo n.º 28
0
 def set_defaults(self):
     self.loc = Vector3(self.context, None, None)
     self.direction = Vector3(self.context, None, None)
     self.min = 0
     self.max = 0
Ejemplo n.º 29
0
    def __init__(self, context, arg=None, template=None):
        self.name = ''
        self._context = context
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0

        # the smallest coordinates across all axes
        self.bounds_min = Vector3(self.context, None, None)

        # not sure, for PZ often 40 00 00 37 for animals
        self.unk_float_a = 0

        # the biggest coordinates across all axes
        self.bounds_max = Vector3(self.context, None, None)

        # scale: pack_offset / 512, also added as offset
        self.pack_offset = 0

        # cog? medium of bounds?
        self.center = Vector3(self.context, None, None)

        # probably from center to max
        self.radius = 0

        # seen 6 or 1, matches lod count
        self.num_lods_2 = 0

        # zero
        self.zero = 0

        # verbatim repeat
        self.bounds_min_repeat = Vector3(self.context, None, None)

        # verbatim repeat
        self.bounds_max_repeat = Vector3(self.context, None, None)
        self.num_materials = 0
        self.num_lods = 0
        self.num_objects = 0

        # count of MeshData fragments for the mdl2 this struct refers to
        self.num_meshes = 0

        # ?
        self.last_count = 0

        # this has influence on whether newly added shells draw correctly; for PZ usually 4, except for furry animals; ZT african ele female
        self.render_flag = RenderFlag()

        # ?
        self.unks = numpy.zeros((7), dtype='ushort')
        self.pad = numpy.zeros((3), dtype='ushort')
        self.materials_ptr = 0
        self.lods_ptr = 0
        self.objects_ptr = 0
        self.models_ptr = 0
        self.first_materials_ptr = 0
        self.zeros_ztuac = numpy.zeros((4), dtype='uint64')

        # unknown, probably used to increment skeleton
        self.increment_flag = 0
        self.zero_0 = 0
        self.zero_1 = 0
        self.zero_2 = 0
        self.set_defaults()
Ejemplo n.º 30
0
	def set_defaults(self):
		self.loc = Vector3(self.context, None, None)
		self.floats = numpy.zeros((5, 3), dtype='float')
		self.radians = numpy.zeros((8), dtype='float')