Fix: Collect attachment names referenced in animations for string table#24
Draft
f14XuanLv wants to merge 1 commit intowang606:mainfrom
Draft
Fix: Collect attachment names referenced in animations for string table#24f14XuanLv wants to merge 1 commit intowang606:mainfrom
f14XuanLv wants to merge 1 commit intowang606:mainfrom
Conversation
3a47a1f to
2a6780d
Compare
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.
问题描述
在写入二进制文件时,Spine 使用字符串表机制来优化存储。所有被引用的字符串需要在文件开头的字符串表中声明,后续通过索引引用。
原有代码在收集字符串时存在遗漏:
animation.slots.attachmenttimeline 中的 attachment 引用animation.attachments(deform/sequence) 中的 attachment 名称这会导致报错:
修复内容
在字符串收集阶段增加对动画中 attachment 引用的收集:
收集 slot attachment timeline 中的引用
收集 deform/sequence 动画中的 attachment 名称
影响版本
测试
从 p0001_Lily.zip 解压出
p0001_Lily.atlas和p0001_Lily.skel在项目源码目录下创建
p0001_Lily_3.8.99文件夹 和test_conv_fix.bat测试脚本,如下所示:test_conv_fix.bat测试脚本内容如下如果应用该 fix , 则报错问题解决,可成功完成版本转换