Removed generated files, added cache clearing in debug
This commit is contained in:
@ -649,6 +649,12 @@ impl OutputsCache {
|
||||
self.invalidate_cache(&output_id);
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn reset_cache(&mut self) {
|
||||
let mut internals = self.internals.write().unwrap();
|
||||
*internals = CacheInternals::default();
|
||||
}
|
||||
}
|
||||
|
||||
/// The graph 'global' state.
|
||||
@ -1255,6 +1261,30 @@ impl eframe::App for AppHandle {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
use eframe::egui::{PopupCloseBehavior, RectAlign};
|
||||
|
||||
let response = egui::Frame::group(ui.style())
|
||||
.show(ui, |ui| {
|
||||
ui.set_max_height(20.);
|
||||
ui.set_max_width(40.);
|
||||
ui.vertical_centered(|ui| ui.button("Cache")).inner
|
||||
})
|
||||
.inner;
|
||||
egui::Popup::menu(&response)
|
||||
.align(RectAlign::BOTTOM_END)
|
||||
.gap(4.)
|
||||
.close_behavior(PopupCloseBehavior::CloseOnClickOutside)
|
||||
.id(egui::Id::new("cache"))
|
||||
.show(|ui| {
|
||||
if ui.button("Clear").clicked() {
|
||||
self.user_state.cache.reset_cache();
|
||||
ui.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -27,6 +27,13 @@ pub fn evaluate_node(
|
||||
|
||||
let mut to_ret = None;
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
if !to_evaluate.is_empty() {
|
||||
println!("evaluating nodes {:?}", to_evaluate);
|
||||
}
|
||||
}
|
||||
|
||||
// for each node to evaluate (in the correct order) finds the output and
|
||||
// populates the cache
|
||||
for node_id in to_evaluate {
|
||||
|
||||
Reference in New Issue
Block a user