@@ -15,6 +15,7 @@ use re_log_types::{TableId, TableMsg, TimeReal};
15
15
use re_memory:: AccountingAllocator ;
16
16
use re_viewer_context:: { AsyncRuntimeHandle , TimeBlueprintExt as _, open_url} ;
17
17
18
+ use crate :: app:: AppBlueprintCtx ;
18
19
use crate :: app_state:: recording_config_entry;
19
20
use crate :: history:: install_popstate_listener;
20
21
use crate :: web_tools:: { Callback , JsResultExt as _, StringOrStringArray } ;
@@ -438,7 +439,7 @@ impl WebHandle {
438
439
//TODO(#10737): we should refer to logical recordings using store id (recording id is ambibuous)
439
440
#[ wasm_bindgen]
440
441
pub fn set_active_timeline ( & self , recording_id : & str , timeline_name : & str ) {
441
- let Some ( mut app) = self . runner . app_mut :: < crate :: App > ( ) else {
442
+ let Some ( app) = self . runner . app_mut :: < crate :: App > ( ) else {
442
443
return ;
443
444
} ;
444
445
@@ -475,7 +476,7 @@ impl WebHandle {
475
476
//TODO(#10737): we should refer to logical recordings using store id (recording id is ambibuous)
476
477
#[ wasm_bindgen]
477
478
pub fn set_time_for_timeline ( & self , recording_id : & str , timeline_name : & str , time : f64 ) {
478
- let Some ( mut app) = self . runner . app_mut :: < crate :: App > ( ) else {
479
+ let Some ( app) = self . runner . app_mut :: < crate :: App > ( ) else {
479
480
return ;
480
481
} ;
481
482
@@ -563,6 +564,7 @@ impl WebHandle {
563
564
store_hub,
564
565
state,
565
566
egui_ctx,
567
+ command_sender,
566
568
..
567
569
} = & mut * app;
568
570
@@ -575,7 +577,25 @@ impl WebHandle {
575
577
let Some ( recording) = hub. store_bundle ( ) . get ( & store_id) else {
576
578
return ;
577
579
} ;
578
- let rec_cfg = recording_config_entry ( & mut state. recording_configs , recording) ;
580
+
581
+ let Some ( blueprint) = hub. active_blueprint_for_app ( store_id. application_id ( ) ) else {
582
+ return ;
583
+ } ;
584
+
585
+ let default_blueprint = hub. default_blueprint_for_app ( store_id. application_id ( ) ) ;
586
+
587
+ let blueprint_query =
588
+ re_chunk:: LatestAtQuery :: latest ( re_viewer_context:: blueprint_timeline ( ) ) ;
589
+
590
+ // Can't use `app.blueprint_ctx(...)` here because of borrow issues.
591
+ let ctx = AppBlueprintCtx {
592
+ command_sender,
593
+ current_blueprint : blueprint,
594
+ default_blueprint,
595
+ blueprint_query,
596
+ } ;
597
+
598
+ let rec_cfg = recording_config_entry ( & mut state. recording_configs , recording, & ctx) ;
579
599
580
600
let play_state = if value {
581
601
re_viewer_context:: PlayState :: Playing
@@ -586,7 +606,7 @@ impl WebHandle {
586
606
rec_cfg
587
607
. time_ctrl
588
608
. write ( )
589
- . set_play_state ( recording. times_per_timeline ( ) , play_state) ;
609
+ . set_play_state ( recording. times_per_timeline ( ) , play_state, & ctx ) ;
590
610
egui_ctx. request_repaint ( ) ;
591
611
}
592
612
}
0 commit comments