MCPcopy Create free account
hub / github.com/PerroEngine/Perro / clear_preview

Function clear_preview

perro_editor/res/scripts/scene/editor_viewport.rs:768–786  ·  view source on GitHub ↗
(ctx: &mut ScriptContext<'_, API>)

Source from the content-addressed store, hash-verified

766 dirty.iter().any(|item| item == *path)
767 || (active_dirty && active == Some(path.as_str()))
768 })
769 .cloned()
770 .collect::<Vec<_>>();
771 if !conflicts.is_empty() {
772 return ProjectSceneChange::Conflict(conflicts);
773 }
774 if let Some(path) = active
775 && changed.iter().any(|item| item == path)
776 {
777 return ProjectSceneChange::ReloadActive(path.to_string());
778 }
779 if changed
780 .iter()
781 .any(|path| preview.iter().any(|item| item == path))
782 {
783 return ProjectSceneChange::ReloadPreview;
784 }
785 ProjectSceneChange::Notice
786}
787
788#[cfg(test)]
789mod project_scene_change_tests {

Callers 5

rebuild_previewFunction · 0.85
open_projectFunction · 0.85
close_all_scene_tabsFunction · 0.85
close_scene_tabFunction · 0.85
delete_active_assetFunction · 0.85

Calls 2

NodesMethod · 0.80
remove_nodeMethod · 0.45

Tested by

no test coverage detected