mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
loader/lottie: fix a precomposition+matting.
the matting target with a precomp lost the referencing in the building the structure. this fixes it.
This commit is contained in:
parent
cea63125a4
commit
6b3bd8b27a
1 changed files with 8 additions and 3 deletions
|
@ -885,11 +885,16 @@ static bool _buildPrecomp(LottieComposition* comp, LottieGroup* parent)
|
|||
for (auto c = parent->children.data; c < parent->children.end(); ++c) {
|
||||
auto child = static_cast<LottieLayer*>(*c);
|
||||
|
||||
//attach the referencing layer.
|
||||
//attach the precomp layer.
|
||||
if (child->refId) _buildReference(comp, child);
|
||||
|
||||
//parenting
|
||||
if (child->matte.target) _bulidHierarchy(parent, child->matte.target);
|
||||
if (child->matte.target) {
|
||||
//parenting
|
||||
_bulidHierarchy(parent, child->matte.target);
|
||||
//precomp referencing
|
||||
if (child->matte.target->refId) _buildReference(comp, child->matte.target);
|
||||
}
|
||||
|
||||
if (child->pid != -1) _bulidHierarchy(parent, child);
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue