code-vr icon indicating copy to clipboard operation
code-vr copied to clipboard

Python to Scene Graph

Open lborg019 opened this issue 7 years ago • 1 comments

I'm on it

lborg019 avatar May 24 '17 19:05 lborg019

@lborg019, The AST conforms to a certain schema, and will need to be converted to a scene with actors.

let ast = import_from_python("./mypythonfile.py");

for node in ast {
  match node {
     Node::Module(data) => {
        scene.add(Module::new(data));
     },
     // Match other types of modules
     // Repeat some stuff recursively
     _ => ()
  }
}

alaingalvan avatar Jun 07 '17 19:06 alaingalvan