Update nested render opacity.

https://2dimensions.slack.com/archives/CHMAP278R/p1655715374999519

Diffs=
189d4aa39 Update nested render opacity.
This commit is contained in:
luigi-rosso
2022-06-20 21:50:48 +00:00
parent cf00a4f6ca
commit 2fd9a32508
2 changed files with 3 additions and 2 deletions

View File

@@ -1 +1 @@
9d1df484152fc211ade08fd7174e62d5053b9a64
189d4aa39438c91a1c0e2d74957c20bfa8cff855

View File

@@ -27,6 +27,7 @@ void NestedArtboard::nest(Artboard* artboard) {
m_Artboard = artboard;
m_Artboard->frameOrigin(false);
m_Artboard->opacity(renderOpacity());
m_Instance = nullptr;
if (artboard->isInstance()) {
m_Instance.reset(static_cast<ArtboardInstance*>(artboard)); // take ownership
@@ -109,7 +110,7 @@ bool NestedArtboard::advance(float elapsedSeconds) {
void NestedArtboard::update(ComponentDirt value) {
Super::update(value);
if (hasDirt(value, ComponentDirt::WorldTransform) && m_Artboard != nullptr) {
if (hasDirt(value, ComponentDirt::RenderOpacity) && m_Artboard != nullptr) {
m_Artboard->opacity(renderOpacity());
}
}