mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-24 14:45:56 +00:00
Make rbx visualization less noisy, removing paths
This commit is contained in:
@@ -10,6 +10,7 @@ use rbx_tree::RbxId;
|
|||||||
use crate::{
|
use crate::{
|
||||||
imfs::{Imfs, ImfsItem},
|
imfs::{Imfs, ImfsItem},
|
||||||
rbx_session::RbxSession,
|
rbx_session::RbxSession,
|
||||||
|
web::InstanceMetadata,
|
||||||
};
|
};
|
||||||
|
|
||||||
static GRAPHVIZ_HEADER: &str = r#"
|
static GRAPHVIZ_HEADER: &str = r#"
|
||||||
@@ -63,9 +64,10 @@ fn visualize_rbx_node(session: &RbxSession, id: RbxId, output: &mut fmt::Formatt
|
|||||||
|
|
||||||
let mut node_label = format!("{}|{}|{}", node.name, node.class_name, id);
|
let mut node_label = format!("{}|{}|{}", node.name, node.class_name, id);
|
||||||
|
|
||||||
if let Some(metadata) = session.get_instance_metadata(id) {
|
if let Some(session_metadata) = session.get_instance_metadata(id) {
|
||||||
|
let metadata = InstanceMetadata::from_session_metadata(session_metadata);
|
||||||
node_label.push('|');
|
node_label.push('|');
|
||||||
node_label.push_str(&serde_json::to_string(metadata).unwrap());
|
node_label.push_str(&serde_json::to_string(&metadata).unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
node_label = node_label
|
node_label = node_label
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ pub struct InstanceMetadata {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl InstanceMetadata {
|
impl InstanceMetadata {
|
||||||
fn from_session_metadata(meta: &MetadataPerInstance) -> InstanceMetadata {
|
pub fn from_session_metadata(meta: &MetadataPerInstance) -> InstanceMetadata {
|
||||||
InstanceMetadata {
|
InstanceMetadata {
|
||||||
ignore_unknown_instances: meta.ignore_unknown_instances,
|
ignore_unknown_instances: meta.ignore_unknown_instances,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user