Giter Club home page Giter Club logo

editor-script-cleanup's Introduction

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.

editor-script-cleanup's People

Contributors

jerakin avatar vlaaad avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.