1
0
mirror of synced 2024-11-24 06:20:12 +01:00

Fix some 3D animations not getting their transforms updated per-frame.

This commit is contained in:
Jennifer Taylor 2021-08-06 21:32:19 +00:00
parent 7e70c6dad1
commit 4584cb3f45
2 changed files with 16 additions and 16 deletions

View File

@ -1570,7 +1570,11 @@ class SWF(TrackedCoverage, VerboseOutput):
self.vprint(f"{prefix} Create object request") self.vprint(f"{prefix} Create object request")
update_request = False update_request = False
if flags & 0x4: if flags & 0x18000004:
# Technically only flag 0x4 is the "use transform matrix" flag, but when they
# added perspective to the format, they also just made setting the TZ or the
# 3x3 transform portion of a 4x4 matrix equivalent. So if those exist, this
# implicitly is enabled.
self.vprint(f"{prefix} Use transform matrix") self.vprint(f"{prefix} Use transform matrix")
projection = AP2PlaceObjectTag.PROJECTION_AFFINE projection = AP2PlaceObjectTag.PROJECTION_AFFINE
transform_information = True transform_information = True

View File

@ -247,21 +247,17 @@ class Matrix:
new.a31 = other.a31 new.a31 = other.a31
new.a32 = other.a32 new.a32 = other.a32
new.a33 = other.a33 new.a33 = other.a33
new.a41 = other.a41 if other.__scale_set:
new.a42 = other.a42 new.a = other.a
new.a43 = other.a43 new.d = other.d
else: if other.__rotate_set:
if other.__scale_set: new.b = other.b
new.a = other.a new.c = other.c
new.d = other.d if other.__translate_xy_set:
if other.__rotate_set: new.tx = other.tx
new.b = other.b new.ty = other.ty
new.c = other.c if other.__translate_z_set:
if other.__translate_xy_set: new.tz = other.tz
new.tx = other.tx
new.ty = other.ty
if other.__translate_z_set:
new.tz = other.tz
return new return new