Blender add-on for exporting scenes into a Defold project as:
.glbmeshes.modelfiles (supports multiple materials).goprefabs (created once, never overwritten).collectionscene file (instances grouped under embeddedroot)
Also supports optional convex collision export per prototype and texture export into your Defold project.
Just open Edit → Preferences → Extensions, search for Reforge, and install it with one click.
No more ZIP files — updates are handled automatically through Blender.
- Go to the Reforge releases page: https://github.com/ufgo/reforge/releases
- Download the desired version (reforge-.zip).
- Open Blender.
- Navigate to: Edit → Preferences → Add-ons
- Click Install from Disk… and select the downloaded ZIP file.
- Enable the Reforge add-on in the add-ons list.
The Reforge panel will appear in:
3D Viewport → Sidebar (N) → Reforge
- Generates a Defold
.collectionwith instances matching Blender transforms. - Instances are grouped like:
embedded_instances { id: "root" children: "<prototype>" ... }- one embedded group per prototype that contains all instances of that prototype.
- Export only assets (GLB + .model + convex collision files) without touching the
.collection. - Useful when you updated a mesh/materials/textures and want to refresh only one prototype.
- For each prototype, the exporter creates a
.modelfile with onematerials {}block per Blender material slot (unique materials, in slot order). - Material matching uses the Blender material name (must match the material name in the exported GLB).
Add custom properties on Blender Material datablocks:
defold_material(string) — Defold.materialpathdefold_texture(string) — Defold texture path (optional)
If these are not set:
defold_materialfalls back to Default Material from the add-on UIdefold_textureis found from the material nodes:Principled BSDF -> Base Color -> Image Texture
- if no image is found, a fallback built-in Defold logo texture is used.
When enabled, the add-on copies/saves textures into:
assets/textures/
Textures are overwritten (no _1, _2 duplicates).
Per-prototype collision export is controlled via Object custom properties:
defold_collision(bool) — enable convex collision exportcollision_group(string, default:"default")collision_mask(string, default:"default")
For prototypes with defold_collision = true, exporter generates:
assets/collisions/<proto>.convexshapeassets/collisions/<proto>.collisionobject
Collision objects are created as STATIC:
type: COLLISION_OBJECT_TYPE_STATIC
mass: 0.0
friction: 0.1
restitution: 0.5
The add-on can remove only exporter-created custom properties from:
- Objects
- Materials used by those objects
Keys removed:
- Object:
defold_prototype,defold_collision,collision_group,collision_mask - Material:
defold_material,defold_texture
Each Clear action uses Blender’s confirmation popup.
-
Save the add-on script as a single
.pyfile (example:defold_scene_exporter.py). -
In Blender:
- Edit → Preferences → Add-ons
- Install… → select the
.pyfile - Enable the add-on checkbox
Panel location:
- 3D Viewport → Sidebar (N) → Defold Export
In the add-on panel:
- Defold Project Root → select your Defold project folder
Default folders (editable):
assets/modelsassets/prefabsassets/scenesassets/texturesassets/collisions
The exporter only includes objects that have custom property:
defold_prototype
Fast way:
- Use Tools section:
-
- Set Props (Selected)
-
- Set Props (Visible)
-
- Set Props (All)
-
This creates defold_prototype using the object name.
- Set Collection Name
- Press Generate Scene (
.collection)
Select the prototype’s mesh object and press:
- Export Selected Prototype (No Scene)
How to assign Defold material/texture per Blender material
Select your material → Material Properties → Custom Properties:
Optional:
defold_material=/assets/materials/my.materialdefold_texture=/assets/textures/my.png
If you don’t set them:
defold_materialuses UI Default Materialdefold_textureis taken from Principled BSDF -> Base Color image node
On the Blender Object (not Material):
defold_collision=Truecollision_group=default(or your group)collision_mask=default(or your mask)
You can set these quickly using the Tools section in the panel.
- If a
.gofile already exists, exporter will not rewrite it. - This is intentional to preserve manual edits (collision setup, scripts, etc).
Per export, for each prototype:
<proto>.glb<proto>.model<proto>.convexshape(if enabled)<proto>.collisionobject(if enabled)- the
.collectionfile (when generating scene)
If enabled, only objects that are visible in the viewport are exported.
- Ensure objects are Meshes
- Ensure
defold_prototypeexists as a custom property - Check Export Visible Only and visibility of objects
This add-on overwrites by filename. If you still see duplicates:
- Make sure your Defold textures folder isn’t read-only
- Ensure images have stable filenames (not generated temporary names)
- Convex hull export uses rotation+scale but not translation (correct for Defold local collision space).
- Avoid negative scale / mirrored objects.
- Apply transforms in Blender if your object has unusual transforms.
