Fix some issues with blueprint exporter
This commit is contained in:
@@ -105,6 +105,10 @@ Blueprints are automatically exported to readable text files in `Saved/Blueprint
|
|||||||
- `Docs/Difference Transmission with Threads.md` — why concurrent diff transmission is hard
|
- `Docs/Difference Transmission with Threads.md` — why concurrent diff transmission is hard
|
||||||
- `Docs/Blueprint Text Export.md` — how blueprints are auto-exported to readable text
|
- `Docs/Blueprint Text Export.md` — how blueprints are auto-exported to readable text
|
||||||
|
|
||||||
|
## Git
|
||||||
|
|
||||||
|
Do not use git to make changes (commit, push, branch, etc.). Read-only git commands (status, log, diff, etc.) are fine.
|
||||||
|
|
||||||
## Coding Conventions
|
## Coding Conventions
|
||||||
|
|
||||||
- Do not use static functions in Unreal code. Use class methods or namespace-scoped functions instead.
|
- Do not use static functions in Unreal code. Use class methods or namespace-scoped functions instead.
|
||||||
|
|||||||
Binary file not shown.
@@ -317,17 +317,20 @@ FString FlxBlueprintExporter::SanitizeName(const FString& Title)
|
|||||||
bool PrevWasUnderscore = true; // suppress leading underscore
|
bool PrevWasUnderscore = true; // suppress leading underscore
|
||||||
for (TCHAR Ch : Title)
|
for (TCHAR Ch : Title)
|
||||||
{
|
{
|
||||||
if (FChar::IsAlnum(Ch))
|
if (FChar::IsWhitespace(Ch))
|
||||||
{
|
{
|
||||||
Result += Ch;
|
if (!PrevWasUnderscore)
|
||||||
PrevWasUnderscore = false;
|
|
||||||
}
|
|
||||||
else if (!PrevWasUnderscore)
|
|
||||||
{
|
{
|
||||||
Result += TEXT('_');
|
Result += TEXT('_');
|
||||||
PrevWasUnderscore = true;
|
PrevWasUnderscore = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Result += Ch;
|
||||||
|
PrevWasUnderscore = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Trim trailing underscore
|
// Trim trailing underscore
|
||||||
if (Result.Len() > 0 && Result[Result.Len() - 1] == TEXT('_'))
|
if (Result.Len() > 0 && Result[Result.Len() - 1] == TEXT('_'))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user