Matthew Riley

mgriley97@gmail.com

Clay

Clay is a python library (in progress) for creating your own graphical developer tools, such as 2D map editors for games. The goal is to be able to make your own mini Unity-like editor for your own custom data-types and needs.

Clay is a work in progress that I hack on occassionally when I have time. I’ve included explanations and demos of some of the cooler features below.

Architecture

The user installs the library using PyPi (eventually), and calls the entry point launch_main_app() from a script. This function launches a desktop window called the Clay Editor. It reads a clay config file to load a list of user-written Python scripts.

These user scripts register the data-types that you want to work with. You tell Clay what properties are in each data-type and how it should be drawn/represented in the Editor. Clay generates a full-featured property-editor for each of your data-types, with automatic serialization support for saving/loading files. Want a List of List of Option{Int} objects? Clay will generate an editor for it! It comes with a number of utilities for things like: drawing simple primitives/images, click-to-select/drag, add/delete/move nodes in a tree, and so on.

Here is a (sped up) demo of setting up a “Hello World” project from scratch:

More Features

Child Components

Reference Viewer

Window Wrangling

Shape Editor Demo

Code: https://github.com/mgriley/clay