diff options
author | metamuffin <metamuffin@disroot.org> | 2025-02-03 21:46:29 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-02-03 21:46:29 +0100 |
commit | ae14c194a25e258659104e89553ad48a8ae9ca3b (patch) | |
tree | 793b73af2c045d7acf218912afbc182a6720436f /world/src/mesh.rs | |
parent | 163e10c9f618f0e4cd7b4456476ad1c2322db5d7 (diff) | |
download | weareserver-ae14c194a25e258659104e89553ad48a8ae9ca3b.tar weareserver-ae14c194a25e258659104e89553ad48a8ae9ca3b.tar.bz2 weareserver-ae14c194a25e258659104e89553ad48a8ae9ca3b.tar.zst |
armatures in prefab
Diffstat (limited to 'world/src/mesh.rs')
-rw-r--r-- | world/src/mesh.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/world/src/mesh.rs b/world/src/mesh.rs index 8afefb4..b0b55b7 100644 --- a/world/src/mesh.rs +++ b/world/src/mesh.rs @@ -21,7 +21,7 @@ use log::{debug, info}; use std::path::Path; use weareshared::{ Affine3A, Vec3A, - resources::{Armature, MeshPart, Prefab}, + resources::{MeshPart, Prefab}, store::ResourceStore, vec2, vec3a, vec4, }; @@ -36,7 +36,6 @@ pub fn import_mesh( prefab: &mut Prefab, args: &Args, texture_cache: &TextureCache, - armatures: &[Option<Armature>], ) -> Result<()> { for p in mesh.primitives() { let name = mesh.name().or(node.name()).map(|e| e.to_owned()); @@ -336,12 +335,7 @@ pub fn import_mesh( None }; - let mut armature = None; - if let Some(skin) = node.skin() { - if let Some(a) = &armatures[skin.index()] { - armature = Some(store.set(a)?); - } - } + let armature = node.skin().map(|s| s.index() as u32); let mesh = store.set(&MeshPart { name, |