From ae14c194a25e258659104e89553ad48a8ae9ca3b Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 3 Feb 2025 21:46:29 +0100 Subject: armatures in prefab --- world/src/mesh.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'world/src/mesh.rs') 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], ) -> 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, -- cgit v1.2.3-70-g09d2