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

Function pick_preview_ui

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

Source from the content-addressed store, hash-verified

2484 ];
2485 ctx.res.Draw2D().polygon(points.clone(), fill, 1.0);
2486 ctx.res
2487 .Draw2D()
2488 .polyline(vec![points[0], points[1], points[2], points[0]], line, 2.0);
2489 for point in points {
2490 ctx.res.Draw2D().circle(point, 4.0, [0.84, 1.0, 1.0, 1.0]);
2491 }
2492 }
2493 }
2494}
2495
2496pub fn attach_preview_to_viewport<API: ScriptAPI + ?Sized>(
2497 ctx: &mut ScriptContext<'_, API>,
2498 root: NodeID,
2499) -> bool {
2500 let Some(panel) = find_named(ctx, "viewport_panel") else {

Callers 3

handle_viewport_clickFunction · 0.85
update_preview_pickFunction · 0.85
editor_cursor_iconFunction · 0.85

Calls 4

viewport_pointerFunction · 0.85
cached_scene_doc_sharedFunction · 0.85
pick_doc_ui_nodeFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected