From 584d00fa00d673b974f5bede96e856b6764e834f Mon Sep 17 00:00:00 2001 From: bodymovin Date: Thu, 28 Mar 2024 00:09:58 +0000 Subject: [PATCH] propagate parent input change to nested input We have decided to add a new attribute to our code generator that will allow to overwrite the behavior of property setters for the c++ runtime. For the editor, the solution is more complex because we still need to reflect the nested artboard value in the inspector so users can follow changes both at the parent and the child level. Diffs= fee67f16d propagate parent input change to nested input (#6878) ff2c0cbf6 apply final update if it has not been applied before (#6930) f3739347c Get wasm sizes back down. (#6927) a0a40213f No simd canvas (#6926) e2328daeb More LTO tweaks (#6904) cae08a3c5 Add a @rive-app/webgl2 package that uses PLS (#6845) Co-authored-by: hernan --- .rive_head | 2 +- lib/src/rive_core/animation/nested_bool.dart | 7 +++++++ lib/src/rive_core/animation/nested_number.dart | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.rive_head b/.rive_head index fd74335..292ff7c 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -f4ef0e301ea18efa2863b2bff5450d0b6dfa8f67 +fee67f16df7648b5c9bc100b6221c7ba5baca0af diff --git a/lib/src/rive_core/animation/nested_bool.dart b/lib/src/rive_core/animation/nested_bool.dart index da6a079..66bef53 100644 --- a/lib/src/rive_core/animation/nested_bool.dart +++ b/lib/src/rive_core/animation/nested_bool.dart @@ -7,4 +7,11 @@ class NestedBool extends NestedBoolBase { @override void updateValue() => nestedStateMachine?.setInputValue(inputId, nestedValue); + + @override + set nestedValue(bool value) { + super.nestedValue = value; + + updateValue(); + } } diff --git a/lib/src/rive_core/animation/nested_number.dart b/lib/src/rive_core/animation/nested_number.dart index dddd3c7..e5bfa81 100644 --- a/lib/src/rive_core/animation/nested_number.dart +++ b/lib/src/rive_core/animation/nested_number.dart @@ -7,4 +7,11 @@ class NestedNumber extends NestedNumberBase { @override void updateValue() => nestedStateMachine?.setInputValue(inputId, nestedValue); + + @override + set nestedValue(double value) { + super.nestedValue = value; + + updateValue(); + } }