forked from rojo-rbx/rojo
Add RojoTree::get_ids_at_path
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
use std::{collections::HashMap, path::PathBuf};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use rbx_dom_weak::{Descendants, RbxId, RbxInstance, RbxInstanceProperties, RbxTree, RbxValue};
|
||||
|
||||
@@ -135,6 +138,10 @@ impl RojoTree {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_ids_at_path(&self, path: &Path) -> &[RbxId] {
|
||||
self.path_to_ids.get(path)
|
||||
}
|
||||
|
||||
fn get_metadata(&self, id: RbxId) -> Option<&InstanceMetadata> {
|
||||
self.metadata_map.get(&id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user