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

Method parse

perro_editor/res/scripts/scene/editor_nodes.rs:1293–1306  ·  view source on GitHub ↗
(raw: &str)

Source from the content-addressed store, hash-verified

1291 .find(|node| node.key == key)
1292 .map(|node| node_type_kind(node.data.node_type))
1293}
1294
1295pub fn node_type_kind(node_type: perro_scene::NodeType) -> &'static str {
1296 if node_type.is_a(perro_scene::NodeType::Node2D) {
1297 "2D"
1298 } else if node_type.is_a(perro_scene::NodeType::Node3D) {
1299 "3D"
1300 } else if node_type.is_a(perro_scene::NodeType::UiNode) {
1301 "UI"
1302 } else {
1303 "Node"
1304 }
1305}
1306
1307pub fn parent_node_rank(kind: Option<&str>, node_type: perro_scene::NodeType) -> u8 {
1308 match kind {
1309 Some("2D") if node_type.is_a(perro_scene::NodeType::Node2D) => 0,

Callers 3

inspector_var_bit_buttonFunction · 0.45
matrix_kind_shapeFunction · 0.45
matrix_kind_shapeFunction · 0.45

Calls 2

is_emptyMethod · 0.45
pushMethod · 0.45

Tested by 2

matrix_kind_shapeFunction · 0.36
matrix_kind_shapeFunction · 0.36