Created
July 16, 2017 05:06
-
-
Save deathponta/b693f09b11f0d4aaf630a3ce4e5aea0c to your computer and use it in GitHub Desktop.
テクスチャ絶対パスを相対パスに置き換え
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = DotNetClass "System.IO.Path" | |
-- path をプリントするだけ | |
for map in ( GetClassInstances BitmapTexture ) do( | |
-- 絶対パスから名前と拡張子を取り出す | |
fileNameExtension = p.GetFileName( map.fileName ) | |
-- テクスチャパスを相対パスに | |
map.fileName = "..\\tex\\" + fileNameExtension | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment