Merge branch 'Preview4_0_DevHead' into tsneo
|
|
@ -2381,11 +2381,25 @@ void AssetImporter::resolveAssetItemIssues(AssetImportObject* assetItem)
|
||||||
}
|
}
|
||||||
else if (activeImportConfig->DuplicateAutoResolution == String("FolderPrefix"))
|
else if (activeImportConfig->DuplicateAutoResolution == String("FolderPrefix"))
|
||||||
{
|
{
|
||||||
//Set trailing number
|
|
||||||
String renamedAssetName = assetItem->assetName;
|
String renamedAssetName = assetItem->assetName;
|
||||||
String owningFolder = assetItem->filePath.getDirectory(assetItem->filePath.getDirectoryCount() - 1);
|
|
||||||
|
|
||||||
renamedAssetName = owningFolder + "_" + renamedAssetName;
|
//Set trailing number
|
||||||
|
S32 dirIndex = assetItem->filePath.getDirectoryCount() - 1;
|
||||||
|
while (dirIndex > -1)
|
||||||
|
{
|
||||||
|
renamedAssetName = assetItem->assetName;
|
||||||
|
String owningFolder = assetItem->filePath.getDirectory(dirIndex);
|
||||||
|
|
||||||
|
renamedAssetName = owningFolder + "_" + renamedAssetName;
|
||||||
|
|
||||||
|
if (AssetDatabase.isDeclaredAsset(renamedAssetName))
|
||||||
|
{
|
||||||
|
dirIndex--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
//Log it's renaming
|
//Log it's renaming
|
||||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Asset %s was renamed due to %s as part of the Import Configuration", assetItem->assetName.c_str(), humanReadableReason.c_str());
|
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Asset %s was renamed due to %s as part of the Import Configuration", assetItem->assetName.c_str(), humanReadableReason.c_str());
|
||||||
|
|
|
||||||
|
|
@ -574,6 +574,40 @@ DefineEngineFunction( stripChars, const char*, ( const char* str, const char* ch
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
DefineEngineFunction(sanitizeString, const char*, (const char* str), ,
|
||||||
|
"Sanitizes a string of common name issues, such as:\n"
|
||||||
|
"Starting with numbers, replacing spaces with _, and removing any name un-compliant characters such as .,- etc\n"
|
||||||
|
"@param str The string to sanitize.\n"
|
||||||
|
"@return A version of @a str with all occurrences of invalid characters removed.\n\n"
|
||||||
|
"@tsexample\n"
|
||||||
|
"cleanString( \"123 .-_abc\"); // Returns \"__abc\"."
|
||||||
|
"@endtsexample\n"
|
||||||
|
"@ingroup Strings")
|
||||||
|
{
|
||||||
|
String processedString = str;
|
||||||
|
|
||||||
|
U32 start;
|
||||||
|
U32 end;
|
||||||
|
String firstNumber = String::GetFirstNumber(processedString, start, end);
|
||||||
|
if (!firstNumber.isEmpty() && processedString.startsWith(firstNumber.c_str()))
|
||||||
|
processedString = processedString.replace(firstNumber, "");
|
||||||
|
|
||||||
|
processedString = processedString.replace(" ", "_");
|
||||||
|
|
||||||
|
U32 len = processedString.length() + 1;
|
||||||
|
char* ret = Con::getReturnBuffer(len);
|
||||||
|
dStrcpy(ret, processedString.c_str(), len);
|
||||||
|
|
||||||
|
U32 pos = dStrcspn(ret, "-+*/%$&<26>=()[].?\\\"#,;!~<>|<7C>^{}");
|
||||||
|
while (pos < dStrlen(ret))
|
||||||
|
{
|
||||||
|
dStrcpy(ret + pos, ret + pos + 1, len - pos);
|
||||||
|
pos = dStrcspn(ret, "-+*/%$&<26>=()[].?\\\"#,;!~<>|<7C>^{}");
|
||||||
|
}
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
DefineEngineFunction( strlwr, const char*, ( const char* str ),,
|
DefineEngineFunction( strlwr, const char*, ( const char* str ),,
|
||||||
|
|
|
||||||
|
|
@ -1284,7 +1284,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
|
|
||||||
bool Platform::dumpDirectories(const char *path, Vector<StringTableEntry> &directoryVector, S32 depth, bool noBasePath)
|
bool Platform::dumpDirectories(const char *path, Vector<StringTableEntry> &directoryVector, S32 depth, bool noBasePath)
|
||||||
{
|
{
|
||||||
bool retVal = recurseDumpDirectories(path, "", directoryVector, 0, depth, noBasePath);
|
bool retVal = recurseDumpDirectories(path, "", directoryVector, -1, depth, noBasePath);
|
||||||
clearExcludedDirectories();
|
clearExcludedDirectories();
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,9 @@ ALboolean LoadOAL10Library(char *szOALFullPathName, LPOPENALFNTABLE lpOALFnTable
|
||||||
return AL_FALSE;
|
return AL_FALSE;
|
||||||
|
|
||||||
if (szOALFullPathName)
|
if (szOALFullPathName)
|
||||||
openal_library = dlopen(szOALFullPathName, RTLD_LAZY);
|
openal_library = dlopen(szOALFullPathName, RTLD_NOW);
|
||||||
else
|
else
|
||||||
openal_library = dlopen("libopenal.so", RTLD_LAZY);
|
openal_library = dlopen("libopenal.so.1", RTLD_NOW);
|
||||||
|
|
||||||
if (openal_library == NULL) {
|
if (openal_library == NULL) {
|
||||||
Con::errorf("Failed to load OpenAL shared library. Sound will not be available");
|
Con::errorf("Failed to load OpenAL shared library. Sound will not be available");
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,8 @@ void TSShapeLoader::updateProgress(S32 major, const char* msg, S32 numMinor, S32
|
||||||
progressMsg = avar("%s (%d of %d)", msg, minor + 1, numMinor);
|
progressMsg = avar("%s (%d of %d)", msg, minor + 1, numMinor);
|
||||||
}
|
}
|
||||||
|
|
||||||
Con::executef("updateTSShapeLoadProgress", Con::getFloatArg(progress), progressMsg);
|
if(Con::isFunction("updateTSShapeLoadProgress"))
|
||||||
|
Con::executef("updateTSShapeLoadProgress", Con::getFloatArg(progress), progressMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,13 @@ bool Platform::displaySplashWindow( String path )
|
||||||
SDL_RenderCopy(gSplashRenderer, gSplashTexture, NULL, NULL);
|
SDL_RenderCopy(gSplashRenderer, gSplashTexture, NULL, NULL);
|
||||||
|
|
||||||
SDL_RenderPresent(gSplashRenderer);
|
SDL_RenderPresent(gSplashRenderer);
|
||||||
|
|
||||||
|
SDL_DestroyTexture(gSplashTexture);
|
||||||
|
gSplashTexture = nullptr;
|
||||||
|
|
||||||
|
SDL_DestroyRenderer(gSplashRenderer);
|
||||||
|
gSplashRenderer = nullptr;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 659 KiB After Width: | Height: | Size: 659 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |