diff --git a/src/main.rs b/src/main.rs index fc08d2f..803d76e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1087,8 +1087,8 @@ fn get_some_texture(material:vmt_parser::material::Material)->AResultAResult>>>(find_stuff:&F,search_name:String)->AResult>{ + println!("looking for {}",search_name); if let Some(stuff)=find_stuff(search_name)?{ - //println!("woahh its a vmt {:?}",search_name); //decode vmt and then write let stuff=String::from_utf8(stuff)?; let material=vmt_parser::from_str(stuff.as_str())?; @@ -1149,9 +1149,11 @@ fn extract_textures(paths:Vec,vpk_path:std::path::PathBuf)-> (Ok(mdl),Ok(vvd),Ok(vtx))=>{ let model=vmdl::Model::from_parts(mdl,vtx,vvd); for texture in model.textures(){ - println!("prop texture={}",texture.name.as_str()); - println!("search paths={:?}",texture.search_paths); - deduplicate.insert(std::path::PathBuf::from(texture.name.as_str())); + for search_path in &texture.search_paths{ + let mut path=std::path::PathBuf::from(search_path.as_str()); + path.push(texture.name.as_str()); + deduplicate.insert(path); + } } }, _=>print!("model_name={} error",model_name),