How do i retrieve the filepath for a loaded model?

I need to find the filepath that a model was loaded from. Is there a way to do this?

The NodePath that you get back from loader.loadModel() will contain a ModelRoot type node. This has a method getFullpath() which returns the full pathname to the model that was loaded. E.g.:

model = loader.loadModel('smiley.egg')
print model.node().getFullpath()


Works great. Thanks!