jassert when restoring external scripts
-
HISE seems to only look in the ScriptProcessors folder for external scripts (not includes). This triggers a jassert
BackendApplicationCommandWindows.cpp: 333
Also if when you connect a MidiProcessor to an external file, that external file is the global script directory, I think it should add the
{GLOBAL_SCRIPT_FOLDER}
wildcard to the path in the xml and restore from that path. -
https://github.com/christophhart/HISE/pull/316
Ok I fixed the assertion. HISE was looking for external scripts in the ScriptProcessors folder and of course they weren't there, so it was triggering the jassert. But it didn't need to go searching for them anyway because external scripts already have their full path in the Script property of the xml.
So I just skip the entire function if it's an external script - might make loading some projects a little faster too.
The next issue is when you connect a script that's in the global scripts folder HISE was using an absolute path, which obviously isn't good if you decide at some point to move or rename one of the folders in that path.
Now I've set it up so that if you connect an external script from the global scripts folder it will add the
{GLOBAL_SCRIPT_FOLDER}
wildcard to the path and it also will translate this back to the global path you've assigned in project settings when you reload the project. I've tested this within HISE and as a standalone build and it seems to work without issue.