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

Function parse_nested_blocks

perro_source/core/perro_animation/src/anim_tree.rs:533–558  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

531
532 #[test]
533 fn parse_nested_blocks() {
534 let src = r#"
535[AnimationTree]
536name = "Player"
537[/AnimationTree]
538[AnimationSlots]
539Idle
540Run
541[/AnimationSlots]
542[MoveBlend]
543[Blend]
544inputs = [@Idle, @Run]
545weights = [1.0, 0.0]
546mask = { objects=[Hero], fields=[position, rotation] }
547[/Blend]
548[/MoveBlend]
549[Output]
550input = @MoveBlend
551[/Output]
552"#;
553 let tree = parse_panimtree(src).expect("tree parse");
554 assert_eq!(tree.name.as_ref(), "Player");
555 assert_eq!(tree.slots.len(), 2);
556 assert_eq!(tree.nodes.len(), 1);
557 assert_eq!(tree.output.as_ref(), "MoveBlend");
558 }
559
560 #[test]
561 fn reject_unknown_ref() {

Callers

nothing calls this directly

Calls 2

parse_panimtreeFunction · 0.85
expectMethod · 0.45

Tested by

no test coverage detected