Fix incorrect ImageBytes size and anchor for masked video layers in AE exporter#3589
Open
CodeJhF wants to merge 1 commit into
Open
Fix incorrect ImageBytes size and anchor for masked video layers in AE exporter#3589CodeJhF wants to merge 1 commit into
CodeJhF wants to merge 1 commit into
Conversation
… pixel-floor crop origin.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3589 +/- ##
==========================================
+ Coverage 81.31% 82.28% +0.96%
==========================================
Files 653 691 +38
Lines 77271 87954 +10683
Branches 21918 25281 +3363
==========================================
+ Hits 62836 72376 +9540
- Misses 9994 10300 +306
- Partials 4441 5278 +837 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
参见 discussion #3578
当视频图层(video layer)在 After Effects 中添加了蒙版(mask)时,导出的占位图(ImageBytes)尺寸和锚点不正确,导致播放端图片定位错位。根因有两处:
AEGP_NewFromLayer默认使用当前时间指示器位置,可能落在图层可见区间之外,导出的首帧内容错误(尤其存在 footage slip 时)。改动
仅涉及
exporter/src/export/data/ImageBytes.cpp:GetVideoLayerMaskedOffset,通过AEGP_GetLayerMaskedBounds获取蒙版包围盒在 layer space 的偏移。对包围盒 left/top 使用floor向下取整,与 AE 的像素级裁剪原点保持一致(避免负小数边界下产生 1px 偏差)。anchorX/anchorY,使播放端能在 layer space 正确定位占位图。验证
-DPAG_BUILD_TESTS=ON编译PAGFullTest通过。Resolves discussion #3578