@@ -5,11 +5,14 @@ use crate::egui_nodes::{
55 pin:: { PinSpec , PinType } ,
66} ;
77use bevy:: { asset:: AssetId , ecs:: resource:: Resource , platform:: collections:: HashMap } ;
8- use bevy_animation_graph:: core:: {
9- animation_graph:: { AnimationGraph , PinId , SourcePin , TargetPin } ,
10- animation_node:: AnimationNode ,
11- context:: { GraphContext , SpecContext } ,
12- edge_data:: DataSpec ,
8+ use bevy_animation_graph:: {
9+ core:: {
10+ animation_graph:: { AnimationGraph , PinId , SourcePin , TargetPin } ,
11+ animation_node:: AnimationNode ,
12+ context:: SpecContext ,
13+ edge_data:: DataSpec ,
14+ } ,
15+ prelude:: { graph_context:: GraphContext , node_states:: StateKey } ,
1316} ;
1417use bevy_inspector_egui:: egui:: Color32 ;
1518
@@ -453,18 +456,18 @@ impl GraphReprSpec {
453456 return ( None , None , false ) ;
454457 } ;
455458
456- let source_pin = SourcePin :: NodeTime ( node. name . clone ( ) ) ;
457459 let time = graph_context
458- . caches
459- . get_primary ( |c| c . get_time ( & source_pin ) ) ;
460+ . node_states
461+ . get_time ( node . name . clone ( ) , StateKey :: Default ) ;
460462 let duration = graph_context
461- . caches
462- . get_primary ( |c| c. get_duration ( & source_pin) ) ;
463+ . node_caches
464+ . get_duration ( node. name . clone ( ) , StateKey :: Default )
465+ . ok ( ) ;
463466 let active = graph_context
464- . caches
465- . get_primary ( |c| Some ( c . is_updated ( & node. name ) ) ) ;
467+ . node_caches
468+ . is_updated ( node. name . clone ( ) , StateKey :: Default ) ;
466469
467- ( time, duration. flatten ( ) , active. unwrap_or ( false ) )
470+ ( Some ( time) , duration. flatten ( ) , active)
468471 }
469472
470473 fn add_nodes (
0 commit comments