1
0
mirror of synced 2024-11-12 01:00:46 +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")
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")
projection = AP2PlaceObjectTag.PROJECTION_AFFINE
transform_information = True

View File

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