Previous topicNext topic

User-specified search order for text files etc

Suggestions for new features for Magic.
Post Reply
Terry Payman
Posts: 710
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

User-specified search order for text files etc

Post by Terry Payman »

My porting of projects between Magic versions and different computers would be hugely facilitated if I could specify a search path for GLSLShader files, images etc. My major projects have their assets Collected, but I want to browse others, which are generally broken.

At the moment porting often breaks old projects, and fixing is extremely tedious and time-consuming as every instance of a GLSLShader etc file reference must be located and individually changed. In a multiscene project it usually takes me many attempts to find all the references.

Example. I'm testing a beta-version of Magic, and decide to use the GLSLShader default.txt as a background so I can see where upper layers are transparent.
I always run betas in version-named directories, so every time I make use of a GLSLShader I am embedding an explicit path to a location that could be regarded as temporary. I now understand this, but did not until recently.

If I try to run the same project later, once Magic's out of Beta, the project is broken and hard to fix if the Beta directory is removed. Similar problems arise if library structures have been rationalised/refined/re-arranged since a project was created.

Now that I have fully realised the issues, I understand why I have needed to keep the Beta directories, and multiple copies of libraries so I can browse minor or old projects which have not had their assets collected.

Most problems would be solved if there was a user-specified search order for modules, text files, images etc

I suggest/request that If file is not found (at the explicit location) then search for the filename along the Addition Module Folders paths
Terry Payman
Posts: 710
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: User-specified search order for text files etc

Post by Terry Payman »

I've just tried to get a test project from a newly configured PC to run on another.

Using SysInternal's Process Monitor, I found the project had 84 different PATH NOT FOUND results for ":\Program Files (x86)\Magic_****_Win32\Modules\Special\GLSLShaders\default.txt" . (**** hides the specific test version of Magic). The quickest fix is apparently construct that old **** version path, and place a copy the Modules folder there.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: User-specified search order for text files etc

Post by Magic »

If I try to run the same project later... the project is broken and hard to fix if the directory is removed.
Well, if you remove a directory and thus delete some project assets, the project will be broken... isn't this true for any application? I'll have to do some investigating to see what is the best way to handle this. But I'd probably keep the Additional Module Folders function for what it is -- modules, not assets.
Terry Payman
Posts: 710
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: User-specified search order for text files etc

Post by Terry Payman »

Eric wrote:Well, if you remove a directory and thus delete some project assets, the project will be broken... isn't this true for any application?
OK, but in the case of the "built-in" GLSLShader files the project breaks if one simply changes to a later Magic version from a beta, having deleted the outdated beta's directory.

I don't think you mean to advocate or require that outdated Magic beta directories be kept, so IMHO a relative path, not absolute path, would be more appropriate for Magic's "built-in" GLSLShader files. Then a Magic beta project using no external assets would not be broken simply by updating Magic.
Eric wrote:... But I'd probably keep the Additional Module Folders function for what it is -- modules, not assets.
:? I struggle to understand why a GLSLShader is an "asset" whereas an ISF shader is a "module". To my simple mind they are functionally equivalent, but all that said I would be very grateful for any means to delete all absolute path references in a project, substituting definable search orders.
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: User-specified search order for text files etc

Post by Sadler »

Since I keep shaders, FFGL and ISF together with my media, I also consider these as assets rather than modules. I'll grant you that the lines are blurred when you have a very versatile effect that is more of a module than an asset. I guess the main distinction from MMV's pov is that shaders must be loaded by a shader module hence they are assets, whereas IFS are more 1st class objects with their own UI, though you're right that they're often little more than shaders (I shouldn't belittle shaders, should I, they're often amazing!).

Absolute paths and the program directory don't have to be the same thing- you can put all your modules anywhere without having to move them when you change programmes.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: User-specified search order for text files etc

Post by Magic »

Well, since the issue is really only with the built-in shader files, I might suggest that you go into the Magic/Modules/Special folder and copy the GLSLShaders folder to somewhere more permanent on your system. Now you don't have to worry about the shaders being deleted. And the shaders don't change from Magic version to version, so you don't have to worry about the wrong version either. If you disable Scene > Load Default Module Files, you won't ever again be using the GLSLShaders folder inside the application.
so IMHO a relative path, not absolute path, would be more appropriate

I would be very grateful for any means to delete all absolute path references in a project
All assets already use relative paths, but they are relative to the project file. It wouldn't make sense to do it any other way. If the asset paths are relative to the application, and then you move the project together with its assets to a different location, nothing will work -- even if you've used the Collect Assets function.

The overall idea is to be able to move a project/asset folder to any arbitrary location and have everything still be fine.
Post Reply