Jerakin's editor scripts

I have been updating my post Editor Scripts 🔥: Alpha Release - #38 by Jerakin but it’s getting quite burried so I decided to move them into new topic, I will update this topic with any extensions I create.

editor-script-atlas

  • Add any number of images to the selected atlas.
  • Add any number of images to the selected atlas, as an animation.
  • Create a new atlas from the selected images.
  • Create a new atlas from a selected directory.
  • Remove duplicated images from an atlas.

editor-script-templates

Define your own template files and create them from the file context menu. Use this create default files such as lua modules that have all your basic setup already made in them, such as requiring your utils libraries.

editor-script-extra-locations

Add locations to which you can browse to within the engine. Use this to add locations to things such as save files to easily remove them.

editor-script-align

Align gui nodes. You can find it under the Edit menu. Currently limited as I can not get parent of a node #2815 or all properties from the outline #2819. I also only take Z rotation into account.
Future plans: With #2819 and #2815 I will be able to make this a lot more useful/flexible.

https://github.com/Jerakin/editor-script-align/blob/master/.github/align.gif?raw=true

editor-script-distribute

Distribute gui nodes. You can find it under the Edit menu. It is currently limited in the same way as editor-script-align
Future plans: With #2819 and #2815 I will be able to make this a lot more useful/flexible.

https://raw.githubusercontent.com/Jerakin/editor-script-distribute/refs/heads/master/.github/distribute.gif

editor-script-dependencies

Editor script to update your defold dependencies. Open it through the Edit menu. It might take a couple of seconds for it to open due to the http calls.

Due to there not being asynchronous http calls it’s a bit slow. See it more as a proof of concept.


Edits:
2025-11-14: Replaced old dependency check with the new gui version.
2024-03-09: Added editor-script-templates and editor-script-extra-locations
2024-03-10: Added a feature to atlas to enable you to add the selected images as an animation.
2025-06-10: Added features to atlas to create from directory and remove duplicated images from an atlas.

18 Likes

Gread job @Jerakin
i think Defold needs a separate section in Asset portal for Editor scripts, generally i think asset portal needs a rework

2 Likes

Excellent idea!

What did you have in mind specifically?

1 Like

A post was split to a new topic: Improvements to the Asset Portal

Agree about the separate section. Would be nice to have integrated in the editor too?

My worry is that functionality will look fragmented, especially to relatively new users.

And I would also expect some of this extensions to make it into the editor itself, if they are tackling core functionalities (object snapping and aligning for example).

1 Like

Thanks for sharing the code for the align scripts even if they are incomplete. They helped me a lot when trying to figure out how to write my own editor scripts.

2 Likes

You are very welcome, happy it can at least serve as an example until I can make it more useful

Oh and I would love to see any editor extensions you make :slight_smile:

2 Likes

I didn’t quite manage to produce anything very useful yet, but it was good to get an idea of what’s possible with the system. (I was hoping to basically add shortcuts to some of our existing gui utilities, but since calling gui.* anything from an editor script won’t work, code reuse like that seems practically impossible.)

Added a new extension to the list editor-script-templates. With it you are able to define your own file templates, the script simply copies the defined template file into a new location. I find this very useful at the start of a project where I am often creating a bunch of gui_script and lua files that all use the same libraries/modules.

I also added a section of an old editor-script that I forgot to add to the list editor-script-extra-location. Useful to for quickly browsing to relevant locations.

4 Likes