Adds handling to project importer so if incoming gui files have the %guiContent declaration at the start, it's converted to a global to comply with the script interpreter

This commit is contained in:
Areloch 2021-09-11 02:28:14 -05:00
parent 86fbb3748b
commit 4cf40defe6

View file

@ -470,6 +470,12 @@ function T3Dpre4ProjectImporter::beginCodeFilesImport(%this)
%objectName = findObjectName(%line, "new");
if(strIsMatchExpr("*%guiContent*=*new*", %line))
{
%line = strReplace(%line, "%guiContent", "$guiContent");
%fileWasChanged = true;
}
if(%objectName !$= "")
{
%sanitizedName = sanitizeString(%objectName);