Skip to content

Commit fa89102

Browse files
author
stephen
committed
scenes can transition for control values
1 parent 04f681a commit fa89102

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

src/model.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,23 @@ impl Model {
392392
&fixture.label,
393393
&control_macro_in_fixture.label, control_macro_in_scene
394394
);
395-
control_macro_in_fixture.current_value =
396-
*control_macro_in_scene;
395+
if let Some(ms) = animation_ms {
396+
control_macro_in_fixture.animation =
397+
Some(Animation::new(
398+
Duration::from_millis(ms),
399+
control_macro_in_fixture
400+
.current_value
401+
as f32
402+
/ 255.0,
403+
*control_macro_in_scene as f32
404+
/ 255.0,
405+
Box::new(SineInOut),
406+
))
407+
} else {
408+
debug!("No Animation specified; change immediate");
409+
control_macro_in_fixture.current_value =
410+
*control_macro_in_scene;
411+
}
397412
}
398413
crate::project::SceneValue::ColourValue(_) => {
399414
debug!("This is Colour Macro for fixture; Control Macro from scene will not apply");

0 commit comments

Comments
 (0)