I am trying to load a scene into my level editor from a python file. I have loaded the path of the model, and transformations into a list. How do I load and transform the models when I only have strings?
"nameOfModel" = loader.loadModel("pathToModel")
Another option I have thought of is just directly importing the python module containing the scene after selecting it from the tkFileDialog, but I run into the same string issue.
exec() is also a command you should never use with user input. As you saw, if that happened then a user could execute whatever command he wants inside your script. Exec() does have it’s usefulness, especially for testing purposes where you know you’ll go back and clean up your code or code no one but you is going to be touching, etc. I’d stick with Azraiyl’s idea in this case.