diff options
author | HampusM <hampus@hampusmat.com> | 2024-11-24 21:04:30 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-11-24 21:04:30 +0100 |
commit | 09b9f3c1cbd93c75b2fe69257b278ad3f993adf4 (patch) | |
tree | 8de3ad13c46ec6856e81dc75c047facc11c747c2 /engine/src/file_format/wavefront | |
parent | b233ff766a2e399a0a48a98e1f2121e960254950 (diff) |
refactor(engine): remove 'debug' crate feature flag
Diffstat (limited to 'engine/src/file_format/wavefront')
-rw-r--r-- | engine/src/file_format/wavefront/mtl.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/engine/src/file_format/wavefront/mtl.rs b/engine/src/file_format/wavefront/mtl.rs index ef6e894..d90dbcf 100644 --- a/engine/src/file_format/wavefront/mtl.rs +++ b/engine/src/file_format/wavefront/mtl.rs @@ -44,7 +44,6 @@ pub fn parse(obj_content: &str) -> Result<Vec<NamedMaterial>, Error> .filter(|(_, statement)| matches!(statement.keyword, Keyword::Newmtl)) .count(); - #[cfg(feature = "debug")] tracing::debug!("Material count: {material_cnt}"); statements_to_materials(statements, material_cnt) @@ -93,7 +92,7 @@ pub enum Error }, } -#[cfg_attr(feature = "debug", tracing::instrument(skip_all))] +#[tracing::instrument(skip_all)] fn statements_to_materials( statements: impl IntoIterator<Item = (usize, Statement<Keyword>)>, material_cnt: usize, @@ -110,7 +109,6 @@ fn statements_to_materials( for (line_no, statement) in statements { if statement.keyword == Keyword::Newmtl { if curr_material.ready { - #[cfg(feature = "debug")] tracing::debug!("Building material"); let material = curr_material.material_builder.clone().build(); @@ -135,7 +133,6 @@ fn statements_to_materials( Keyword::Ka => { let color = get_color_from_statement(&statement, line_no)?; - #[cfg(feature = "debug")] tracing::debug!("Adding ambient color"); curr_material.material_builder = @@ -144,7 +141,6 @@ fn statements_to_materials( Keyword::Kd => { let color = get_color_from_statement(&statement, line_no)?; - #[cfg(feature = "debug")] tracing::debug!("Adding diffuse color"); curr_material.material_builder = @@ -153,7 +149,6 @@ fn statements_to_materials( Keyword::Ks => { let color = get_color_from_statement(&statement, line_no)?; - #[cfg(feature = "debug")] tracing::debug!("Adding specular color"); curr_material.material_builder = @@ -172,7 +167,6 @@ fn statements_to_materials( let texture = Texture::open(Path::new(texture_file_path))?; - #[cfg(feature = "debug")] tracing::debug!("Adding ambient map"); let texture_id = texture.id(); @@ -185,7 +179,6 @@ fn statements_to_materials( Keyword::MapKd => { let texture = get_map_from_texture(&statement, line_no)?; - #[cfg(feature = "debug")] tracing::debug!("Adding diffuse map"); let texture_id = texture.id(); @@ -198,7 +191,6 @@ fn statements_to_materials( Keyword::MapKs => { let texture = get_map_from_texture(&statement, line_no)?; - #[cfg(feature = "debug")] tracing::debug!("Adding specular map"); let texture_id = texture.id(); @@ -213,7 +205,6 @@ fn statements_to_materials( } if curr_material.ready { - #[cfg(feature = "debug")] tracing::debug!("Building last material"); let material = curr_material.material_builder.build(); |