updated organization script
This commit is contained in:
1 parent
c448623471
commit
7977fa254c
2 files changed
+5
-7
No files matched your search
Binary file not shown.
@@ -1,14 +1,12 @@
|
|||||||
import re, unreal
|
import re, unreal
|
||||||
|
|
||||||
FOLDERS = {
|
FOLDERS = {
|
||||||
"material": "Materials",
|
|
||||||
"player": "Characters/Player",
|
|
||||||
"enemy": "Characters/Enemy",
|
|
||||||
"particle": "Effects",
|
|
||||||
}
|
|
||||||
CLASS_FOLDERS = {
|
|
||||||
"World": "Maps",
|
"World": "Maps",
|
||||||
"LevelSequence": "Sequences",
|
"LevelSequence": "Sequences",
|
||||||
|
"Material": "Materials",
|
||||||
|
"MaterialInstanceConstant": "Materials",
|
||||||
|
"NiagaraSystem": "Effects",
|
||||||
|
"Blueprint": "Blueprints",
|
||||||
}
|
}
|
||||||
PREFIXES = {
|
PREFIXES = {
|
||||||
"World": "",
|
"World": "",
|
||||||
@@ -38,7 +36,7 @@ for path in lib.list_assets("/Game", recursive=True):
|
|||||||
name = re.sub(r"^(" + "|".join(p for p in PREFIXES.values() if p) + ")", "", name)
|
name = re.sub(r"^(" + "|".join(p for p in PREFIXES.values() if p) + ")", "", name)
|
||||||
name = PREFIXES.get(cls, "") + name
|
name = PREFIXES.get(cls, "") + name
|
||||||
|
|
||||||
folder = CLASS_FOLDERS.get(cls) or next((f for k, f in FOLDERS.items() if k in name.lower()), "Misc")
|
folder = FOLDERS.get(cls, "Misc")
|
||||||
dest = f"/Game/{folder}/{name}"
|
dest = f"/Game/{folder}/{name}"
|
||||||
if path != dest:
|
if path != dest:
|
||||||
lib.rename_asset(path, dest)
|
lib.rename_asset(path, dest)
|
||||||
Reference in new issue
Block a user