From 279a19b6d0fbb329d26222ff698444e50b79b4de Mon Sep 17 00:00:00 2001 From: Vysyr Date: Fri, 4 Sep 2026 23:51:03 +0200 Subject: [PATCH] added pascal case --- Content/Python/organize_content.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content/Python/organize_content.py b/Content/Python/organize_content.py index fd738eb..e383977 100644 --- a/Content/Python/organize_content.py +++ b/Content/Python/organize_content.py @@ -19,6 +19,11 @@ PREFIXES = { "LevelSequence": "LS_", } +def to_pascal_case(name): + parts = re.split(r"[_\-\s]+", name) + return "".join(p[:1].upper() + p[1:] for p in parts if p) + + lib = unreal.EditorAssetLibrary for path in lib.list_assets("/Game", recursive=True): path = path.split(".")[0] @@ -34,6 +39,7 @@ for path in lib.list_assets("/Game", recursive=True): name = base + (f"_{suffix.capitalize()}" if suffix else "") name = re.sub(r"^(" + "|".join(p for p in PREFIXES.values() if p) + ")", "", name) + name = to_pascal_case(name) name = PREFIXES.get(cls, "") + name folder = FOLDERS.get(cls, "Misc")