GLSLShader 'Select A File' dialog box:
1) Default filter of "*.txt" in addition to the present "*.*"
Particularly helpful when picking shader files from amongst other types of file, eg when browsing in a "Collected Assets" folder.
2) Remember "lastpath" for the selected file.
It's a hassle having to repeatedly enter a path that differs from the (install?) default. Copy/paste of a module that "knows" the path is an inelegant workaround.
Filter and lastpath work very nicely for the Open Project (.magic) dialog.
Don't you just hate inconsistency?
GLSLShader 'Select A File' : Add *.txt filter & lastpath
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: GLSLShader 'Select A File' : Add *.txt filter & lastpath
Of course! Thanks for that.
Re: GLSLShader 'Select A File' : Add *.txt filter & lastpath
All my gl shader files have a .glsl extension!
Re: GLSLShader 'Select A File' : Add *.txt filter & lastpath
No problem, I'll add that extension too.
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: GLSLShader 'Select A File' : Add *.txt filter & lastpath
If the default filter is "*.*" no-one will have extra clicks unless they want/need to filter. Would be fine by me.
Otherwise perhaps add a configuration option for an arbitary default filter or a "LastFilter" memory.
Otherwise perhaps add a configuration option for an arbitary default filter or a "LastFilter" memory.
Re: GLSLShader 'Select A File' : Add *.txt filter & lastpath
Hmm. I definitely see how this is an issue. I'm trying to think of a way around it, but the problem is that if a file is already being used in a module, the chooser path is always the path of the file.2) Remember "lastpath" for the selected file.
It's a hassle having to repeatedly enter a path that differs from the (install?) default. Copy/paste of a module that "knows" the path is an inelegant workaround.
For the GLSLShader module, it's important that the default file be loaded when the module is created.
Any thoughts on how to improve this?
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: GLSLShader 'Select A File' : Add *.txt filter & lastpath
Is it sufficient to look at whether the chooser/path has been triggered by the MouseUp event on the GLSLShader's file box?
- or perhaps just "push" a path to the default file when the module is created by Add>Special>GLSLShader, and "pop" back to the user's lastpath afterwards?
- or perhaps just "push" a path to the default file when the module is created by Add>Special>GLSLShader, and "pop" back to the user's lastpath afterwards?
Re: GLSLShader 'Select A File' : Add *.txt filter & lastpath
If "file.ext" is the module's current file, no matter what module it is, it will be the default selection when the file chooser is opened.
The behavior you're looking for would be what happens if no file is selected when the module is created. That's how it works for Video, Image, Model, etc. So I guess I could add an option somewhere to not load files in any modules by default?
EDIT: I tried that and it worked perfectly. So it'll be in the next version
The behavior you're looking for would be what happens if no file is selected when the module is created. That's how it works for Video, Image, Model, etc. So I guess I could add an option somewhere to not load files in any modules by default?
EDIT: I tried that and it worked perfectly. So it'll be in the next version
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: GLSLShader 'Select A File' : Add *.txt filter & lastpath
Sounds perfect, if I have understood correctly. I look forward to trying it!
Many thanks Eric!
Many thanks Eric!