[Bf-extensions-cvs] [ab2ec03] master: After Effects export: fix image export when scale is 0
Damien Picard
noreply at git.blender.org
Wed May 25 12:43:15 CEST 2022
Commit: ab2ec03debcc5cc924163053142146f9b7442b0b
Author: Damien Picard
Date: Thu Dec 9 10:18:41 2021 +0100
Branches: master
https://developer.blender.org/rBACab2ec03debcc5cc924163053142146f9b7442b0b
After Effects export: fix image export when scale is 0
===================================================================
M io_export_after_effects.py
===================================================================
diff --git a/io_export_after_effects.py b/io_export_after_effects.py
index 0f4bd28..2b13b57 100644
--- a/io_export_after_effects.py
+++ b/io_export_after_effects.py
@@ -249,8 +249,11 @@ class ImageExport(ObjectExport):
image_width, image_height = get_image_size(self.obj)
ratio_to_comp = image_width / data['width']
scale = ae_transform[6:9]
- scale[0] /= ratio_to_comp
- scale[1] = scale[1] / ratio_to_comp * image_width / image_height
+ if image_height != 0.0:
+ scale[1] *= image_width / image_height
+ if ratio_to_comp != 0.0:
+ scale[0] /= ratio_to_comp
+ scale[1] /= ratio_to_comp
self.get_prop_keyframe(context, 'position', ae_transform[0:3], time)
self.get_prop_keyframe(context, 'orientation', ae_transform[3:6], time)
More information about the Bf-extensions-cvs
mailing list