hack for model uploads

This commit is contained in:
Quaternions 2024-04-10 03:45:22 -07:00
parent a96715ecaf
commit 6b689c8d6c

View File

@ -1486,11 +1486,12 @@ async fn compile(config:CompileConfig)->AResult<()>{
std::io::BufReader::new(std::fs::File::open(template_path)?)
};
let mut dom=load_dom(input)?;
//hack to traverse root folder as the root object
dom.root_mut().name="src".to_owned();
//add in scripts and models
let mut folder=config.input_folder.clone();
folder.push("src");
let mut stack:Vec<CompileStackInstruction>=dom.root().children().into_iter().map(|&referent|CompileStackInstruction::TraverseReferent(referent,None)).collect();
let mut stack:Vec<CompileStackInstruction>=vec![CompileStackInstruction::TraverseReferent(dom.root_ref(),None)];
while let Some(instruction)=stack.pop(){
match instruction{
CompileStackInstruction::TraverseReferent(item_ref,blacklist)=>{