Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

GDGen

Build Status

Version: 1.0-alpha

An advanced, configurable code generator which aims to automate some aspects of Godot Engine development, namely:

  • creating C++ modules;
  • creating GDNative plugins.

Currently only C++ module generation is supported, so most of the functionallity is revolving around modules.

Requirements

  • Python 3.6+
  • Git (optional)

Compatibility

  • Godot Engine 3.0+ (C++ modules generation)

Installation

pip install git+https://github.com/Xrayez/gdgen

Usage

gdgen [-n NAME] [-s INTERNAL_NAME] [-c CONFIG_PATH] [-o OUTPUT_PATH]

Examples

For most use cases, you can use a simple wizard. Here's an example output:

$ ~/src/godot/modules> gdgen

Module name: My awesome module
Internal module name (snake_case): my_module
Author name (default - You): Me
Engine version (default - latest): 3.1
C++ version (default - c++11): c++20
Number of classes to generate (default - 0): 1
(0) Class name: NewNode
(0) Class inherits: Node
(0) Class path (default - ):
Documentation path (default - docs): doc_classes
Icons path (default - editor/icons): icons
Thirdparty path (default - thirdparty):
Initialize README? (default - True):
License (default - MIT):
Version control system (default - git):
Will be included inside project? (default - False): True
Initialized empty Git repository in ~/src/godot/modules/my_module/.git/

You can also create your own configuration file:

gdgen -c tests/configs/sample.json -o ~/src/godot/modules/

Use default config file, but fill the required fields manually:

gdgen -n MyModule -s my_module

Config

Name Description
name (Required) Descriptive name of the module.
internal_name (Required) The name used by the engine for the module to compile. This name is used by default for any unnamed classes to be generated later (see below).
author The name that will be used to place inside license text. If not set explicitly, the generator is going to attempt to retrieve one with the help of supported version control provider. In case of git, it will use git config user.name value.
engine_version The engine target version used to generate compatible module.
cpp_version The C++ version to compile module-specific source files.
classes An optional array to generate Godot classes. Available fields: name - the class name; inherits - one of the base (Godot) core classes; path - relative base directory to generate classes in.
docs_path If set, configures the module to use module-specific documentation for classes.
icons_path If set, configures the module to use module-specific editor icons for classes.
thirdparty_path If set, configures the module to apply common operations on third-party code (disabling warnings etc).
readme If true, initializes a barebones README file with module installation instructions.
license If set, creates LICENSE file with current year and author substituted from available license templates.
version_control If set, attempts to initialize the module with version control provider of choice.
to_be_included_inside_project If true, creates .gdignore file so that the module can be included inside regular Godot project (for instance, prevents *.obj build files to be wrongly recognized and imported as 3D models).

Metadata

Release files for gdgen 1.0a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gdgen 1.0a0
File Size Uploaded
gdgen-1.0a0.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gdgen 1.0a0
File Interpreter ABI Platform
gdgen-1.0a0-py3-none-any.whl Python 3 none any Details

Total release size: 27.8 kB

Release files / gdgen-1.0a0.tar.gz

Download URL gdgen-1.0a0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
97d68f9708d135fcfb9a9897ed47038ecbab65a54a1516ca22ccface41f64474
BLAKE2b-256 checksum
How to use checksums
6a6d210016612ee9a45086d1ffc45527015db89bca2222e99554c1a1eb00d805
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.4

Release files / gdgen-1.0a0-py3-none-any.whl

Download URL gdgen-1.0a0-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df869c5f6394723824ce3c4feb27a172ed6c0193881f21c8278566334dba9d6d
BLAKE2b-256 checksum
How to use checksums
b38932ca06da9c2c90fc0bac7bb938b806eacfbd9119d57998ee61f915190a0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.4

Release history Release notifications | RSS feed

This release

1.0a0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page