Programmatically know the currently-saved filename?
Hello,
Is there a way I can obtain the currently-saved file's name and path, through the scripting interface? I have been poring over the docs for OS and File (and others!), but haven't seen anything there.
I'm essentially trying to skip a step and save my RSI-prone wrist a few moves-and-clicks, and auto-export the current geometry to a BabylonJS file in the filesystem at the current file's path, using the current file's name as a basis (e.g. saving MyScene, with my intended functionality, would give me MyScene.max.babylon and MyScene.babylon, for which I'm building an auto-loader to pump these graphics to the browser on file-change).
I can certainly prompt myself with the Save As dialog, and I've even gotten the system to auto-export by using something like OS.system('echo ${json} > /path/to/export/file`), but neither of these allows me to really get what I want.
Any help would be appreciated!
Thanks,
- Peter
Hello,
Is there a way I can obtain the currently-saved file's name and path, through the scripting interface? I have been poring over the docs for OS and File (and others!), but haven't seen anything there.
I'm essentially trying to skip a step and save my RSI-prone wrist a few moves-and-clicks, and auto-export the current geometry to a BabylonJS file in the filesystem at the current file's path, using the current file's name as a basis (e.g. saving MyScene, with my intended functionality, would give me MyScene.max.babylon and MyScene.babylon, for which I'm building an auto-loader to pump these graphics to the browser on file-change).
I can certainly prompt myself with the Save As dialog, and I've even gotten the system to auto-export by using something like OS.system('echo ${json} > /path/to/export/file`), but neither of these allows me to really get what I want.
Any help would be appreciated!
Thanks,
- Peter
Last edited: