Skip to content

Jerakin/editor-script-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cleanup

Install

You can use the these editor scripts in your own project by adding this project as a Defold library dependency. Open your game.project file and in the dependencies field under project add:
https://github.com/Jerakin/editor-script-cleanup/archive/master.zip

macOS

You need to make your python installation visible to Defolds Java VM, you need to put your path modifications in $HOME/.bash_profile. This is because I source $HOME/.bash_profile and I opted do it this way instead of export PATH="$PATH:/usr/local/bin" because if you are using pyenv and pyenv-virtualenv it would not pick up on that.

Dependencies

You also need to make sure you have python 3 and deftree installed.
You can easily install deftree with
pip install deftree

Editor Script

This library adds a few scripts that are made to help you clean up your project. Remember to ALWAYS commit all your changes before running these commands as they are all highly destructive.

Remove Unused Images From Project

This script removes all images that can not be found in any resource files

Remove Unused Images From Atlases

This script removes image entries in your atlas that are now missing on disk. For when you have checked removed images manually from explorer.

Remove Unused Resources from GUI

This script removes all Layers, Textures, Fonts etc from GUI files that are not using them. Beware that this is not aware about any switches happening in your lua or gui_scripts, meaning it will remove textures even if you change to them with gui.set_texture or similar for other resources.

Remove Duplicated Images in Atlases

This script removes duplicated images in an atlas. This can be useful if you have a folder of images that you now have added a few more images. Instead of searching the images out you can add the full folder again and then simply run the script to strip out the ones that got duplicated.

Something went wrong

If you want some more information of what is happening create a file in the root of your project called python_log.txt the script checks for that file and output any logging to it.

Releases

No releases published

Packages

No packages published