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

Function apply_viewport_mode

perro_editor/res/scripts/ui/editor_ui.rs:4116–4129  ·  view source on GitHub ↗
(ctx: &mut ScriptContext<'_, API>, mode: &str)

Source from the content-addressed store, hash-verified

4114 }
4115 }
4116}
4117
4118pub fn rewrite_project_res_value(value: &mut SceneValue, project_root: &str) {
4119 match value {
4120 SceneValue::Str(path) if path.starts_with("res://") => {
4121 *path = Cow::Owned(res_to_abs(project_root, path));
4122 }
4123 SceneValue::Object(fields) => {
4124 for (_, value) in fields.to_mut().iter_mut() {
4125 rewrite_project_res_value(value, project_root);
4126 }
4127 }
4128 SceneValue::Array(values) => {
4129 for value in values.to_mut().iter_mut() {
4130 rewrite_project_res_value(value, project_root);
4131 }
4132 }

Callers 2

set_modeFunction · 0.85
refresh_scene_pane_viewFunction · 0.85

Calls 7

viewport_window_aspectFunction · 0.85
set_grid_visibleFunction · 0.85
set_ui_center_sizeFunction · 0.85
set_panel_displayFunction · 0.85
apply_viewport_canvasFunction · 0.85

Tested by

no test coverage detected