summaryrefslogtreecommitdiff
path: root/world/src/vrm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'world/src/vrm.rs')
-rw-r--r--world/src/vrm.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/world/src/vrm.rs b/world/src/vrm.rs
index 1b89642..2888ad0 100644
--- a/world/src/vrm.rs
+++ b/world/src/vrm.rs
@@ -17,10 +17,7 @@
use anyhow::Result;
use gltf::Gltf;
use serde::Deserialize;
-use std::{
- collections::{BTreeMap, BTreeSet},
- fs::File,
-};
+use std::collections::{BTreeMap, BTreeSet};
pub struct VrmInfo {
pub bone_node_names: Vec<(usize, String)>,
@@ -31,14 +28,14 @@ pub fn extract_vrm_data(gltf: &Gltf) -> Result<VrmInfo> {
let mut bone_node_names = Vec::new();
let mut hide_first_person = BTreeSet::new();
if let Some(vrm) = gltf.extension_value("VRM") {
- serde_json::to_writer(File::create("/tmp/vrm").unwrap(), vrm).unwrap();
+ // serde_json::to_writer(std::fs::File::create("/tmp/vrm").unwrap(), vrm).unwrap();
let vrm: Vrm = serde_json::from_value(vrm.clone())?;
for bone in vrm.humanoid.human_bones {
bone_node_names.push((bone.node, bone.bone))
}
}
if let Some(vrm) = gltf.extension_value("VRMC_vrm") {
- serde_json::to_writer(File::create("/tmp/vrmc").unwrap(), vrm).unwrap();
+ // serde_json::to_writer(std::fs::File::create("/tmp/vrmc").unwrap(), vrm).unwrap();
let vrm: Vrmc = serde_json::from_value(vrm.clone())?;
for (name, bone) in vrm.humanoid.human_bones {
bone_node_names.push((bone.node, name))
@@ -54,7 +51,6 @@ pub fn extract_vrm_data(gltf: &Gltf) -> Result<VrmInfo> {
}
}
}
- eprintln!("hide {hide_first_person:?}");
Ok(VrmInfo {
bone_node_names,
hide_first_person,