diff options
author | metamuffin <metamuffin@disroot.org> | 2025-03-22 16:41:27 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-03-22 16:41:27 +0100 |
commit | d780d420a69fe239bdb93ce7d1899e380a682062 (patch) | |
tree | a782e640897b5459b7c6c340b389a8cb1fa02ada /src/classes/mesh.rs | |
parent | e52a32df7dad09a06f2791f8cb8aff51fd856404 (diff) | |
download | unity-tools-d780d420a69fe239bdb93ce7d1899e380a682062.tar unity-tools-d780d420a69fe239bdb93ce7d1899e380a682062.tar.bz2 unity-tools-d780d420a69fe239bdb93ce7d1899e380a682062.tar.zst |
wrong inheritance of meshrenderer
Diffstat (limited to 'src/classes/mesh.rs')
-rw-r--r-- | src/classes/mesh.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/classes/mesh.rs b/src/classes/mesh.rs index 6d21ff5..5a9c229 100644 --- a/src/classes/mesh.rs +++ b/src/classes/mesh.rs @@ -147,15 +147,15 @@ impl VertexData { streams } /// Reads a vertex channel and returns dimension count and data converted to floats - pub fn read_channel(&self, channel: VertexDataChannel) -> Option<(usize, Vec<f32>)> { - let channel = &self.channels[channel as u8 as usize]; + pub fn read_channel(&self, ch: VertexDataChannel) -> Option<(usize, Vec<f32>)> { + let channel = &self.channels[ch as u8 as usize]; if channel.dimension == 0 { return None; } let component_offset = channel.offset as usize; let component_size = channel.format.component_size(); let (offset, stride) = self.stream_layout()[channel.stream as usize]; - debug!("reading {channel:?} vertex channel (stride={stride}, offset={offset})"); + debug!("reading {ch:?} vertex channel (stride={stride}, offset={offset})"); let mut out = Vec::new(); for vi in 0..self.vertex_count as usize { for di in 0..channel.dimension as usize { |