Skip to content

Commit c16a3e4

Browse files
refactor export_indicators.py and get colour changes to work for exported objects. make sure everything is pep8 compliant. finish readme and blender_manifest
1 parent c850a83 commit c16a3e4

File tree

7 files changed

+693
-383
lines changed

7 files changed

+693
-383
lines changed

README.md

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,62 @@
1-
# blender_exporter
2-
A Blender add-on to make the exporting of meshes easier
1+
# EasyMesh Batch Exporter for Blender
2+
3+
![License: GPL-2.0-or-later](https://img.shields.io/badge/License-GPL--2.0--or--later-blue.svg)
4+
![Blender: 4.2+](https://img.shields.io/badge/Blender-4.2+-orange.svg)
5+
6+
A Blender add-on for batch exporting multiple selected mesh objects with customisable settings, including LOD generation and viewport indicators for recent exports.
7+
8+
## Features
9+
10+
* **Batch Export:** Export multiple selected mesh objects at once.
11+
* **Multiple Formats:** Supports exporting to FBX, OBJ, glTF (gltf+bin+textures), USD, and STL.
12+
* **Custom Transforms:**
13+
* Optionally zero the object's location before export.
14+
* Apply custom export scale (behaviour dependent on exporter).
15+
* Set custom Forward and Up axes.
16+
* **Naming Options:** Add custom prefixes and suffixes to exported filenames.
17+
* **Mesh Processing:**
18+
* Apply all existing (visible) modifiers before export.
19+
* Optionally triangulate meshes using different methods.
20+
* Optionally generate Levels of Detail (LODs) using the Decimate modifier (creates `_LOD00`, `_LOD01`, etc. files).
21+
* **Export Indicators:** Provides visual feedback in the viewport for recently exported objects (Green = fresh, Yellow = stale) and lists them in the panel.
22+
* **Status Bar Progress:** Shows export progress in Blender's status bar for longer operations.
23+
24+
## Installation
25+
26+
1. Download the latest release `.zip` file from the [Releases page](https://github.com/doommchips/blender_mesh_exporter/releases).
27+
2. In Blender, go to `Edit` > `Preferences...`.
28+
3. Navigate to the `Add-ons` tab.
29+
4. Click `Install...` and select the downloaded `.zip` file.
30+
5. Find the add-on named "EasyMesh Batch Exporter" in the list (you can search for it).
31+
6. Enable the add-on by checking the checkbox next to its name.
32+
33+
## Usage
34+
35+
1. **Find the Panel:** The add-on's panel appears in the 3D Viewport's Sidebar (Press `N` key if hidden) under the "Exporter" tab.
36+
2. **Select Objects:** Select one or more mesh objects you want to export in the 3D Viewport.
37+
3. **Configure Settings:** Adjust the settings in the "Batch Exporter" panel:
38+
* **Export Path:** Choose the directory where files will be saved.
39+
* **Format:** Select the desired output file format (FBX, OBJ, etc.).
40+
* **Coordinate System:** Set the Forward and Up axes according to your target application's needs.
41+
* **Scale:** Set the global export scale (if supported by the format).
42+
* **Zero Location:** If checked, object copies will have their location set to (0,0,0) before export.
43+
* **Triangulate:** If checked, applies triangulation to the exported mesh copy. Choose the desired method.
44+
* **Rename File:** Add optional Prefix and/or Suffix to the exported filenames.
45+
* **LOD Generation (Optional):** Check the box in the "LOD Generation" sub-panel header to enable it. Configure the number of LODs, Decimation Type, and Ratio/Iterations for each level. Note that LOD0 is the base mesh (after base modifiers/triangulation), and subsequent LODs are generated progressively from fresh copies.
46+
4. **Export:** Click the "Export Selected Meshes" button.
47+
5. **Progress:** Monitor the export progress in Blender's bottom status bar. Console output provides detailed logs.
48+
49+
## Export Indicators
50+
51+
* After an object is successfully exported (including all its LODs if enabled), it will be marked in the viewport.
52+
* **Green:** Object exported within the last minute (`FRESH`).
53+
* **Yellow:** Object exported within the last 5 minutes (`STALE`).
54+
* **Normal Color:** Object export indicator has expired, or indicators were cleared.
55+
* **Visibility:** To see these colours in the 3D Viewport, ensure you are in **Solid** display mode and that the **Shading -> Color** type is set to **Object**.
56+
![Viewport Shading Object Color](https://docs.blender.org/manual/en/latest/_images/editors_3dview_controls_shading_solid_color_object.png) *(Image from Blender Manual)*
57+
* **Recent Exports Panel:** A list of recently exported objects (still FRESH or STALE) appears in a sub-panel. Clicking the icon selects the object.
58+
* **Clear Indicators:** The "Clear All Export Indicators" button at the bottom of the "Recent Exports" panel will immediately remove the status from all objects and restore their original viewport colors.
59+
60+
*(Optional: Add a screenshot of your add-on's panel here)*
61+
```markdown
62+
![Add-on Panel Screenshot](placeholder_panel_screenshot.png)

__init__.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,7 @@
1313
#
1414
# Copyright (C) 2025 Bradley Walker
1515

16-
bl_info = {
17-
"name": "EasyMesh Batch Exporter",
18-
"author": "Bradley Walker",
19-
"version": (1, 1, 0),
20-
"blender": (4, 2, 0),
21-
"location": "View3D > Sidebar > Exporter",
22-
"description": (
23-
"Batch export multiple selected mesh objects with customisable "
24-
"settings like LOD generation, triangulation, prefix/suffix "
25-
"naming, and transform options. Useful for game development "
26-
"pipelines."
27-
),
28-
"warning": "",
29-
"doc_url": "",
30-
"category": "Import-Export",
31-
}
32-
3316
import bpy
34-
35-
# Import other modules
3617
from . import properties
3718
from . import operators
3819
from . import panels
@@ -49,7 +30,7 @@ def register():
4930
properties.register_properties()
5031
for cls in classes:
5132
bpy.utils.register_class(cls)
52-
export_indicators.register() # Register timer and indicator operators/panels
33+
export_indicators.register() # Register timer and indic operators/panels
5334

5435
def unregister():
5536
export_indicators.unregister() # Unregister timer first

blender_manifest.toml

Lines changed: 16 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,45 @@
11
schema_version = "1.0.0"
22

3-
# Example of manifest file for a Blender extension
4-
# Change the values according to your extension
5-
id = "mesh_exporter"
3+
id = "easymesh_batch_exporter"
64
version = "1.0.0"
7-
name = "Mesh Exporter"
8-
tagline = "Make exporting meshes easier"
5+
name = "EasyMesh Batch Exporter"
6+
tagline = "Batch export meshes with LODs, triangulation, custom transforms, and naming."
97
maintainer = "Bradley Walker"
10-
# Supported types: "add-on", "theme"
118
type = "add-on"
129

13-
# Optional link to documentation, support, source files, etc
14-
# website = "https://extensions.blender.org/add-ons/my-example-package/"
10+
# Optional: Add URL to GitHub repo or documentation if available
11+
website = "https://github.com/doommchips/blender_mesh_exporter/releases"
1512

16-
# Optional list defined by Blender and server, see:
17-
# https://docs.blender.org/manual/en/dev/advanced/extensions/tags.html
1813
tags = [
19-
"Import-Export",
14+
"Import-Export",
2015
"Mesh",
2116
"Object",
2217
"Pipeline",
23-
"User Interface"]
18+
"User Interface",
19+
"3D View",
20+
"Game Engine"
21+
]
2422

2523
blender_version_min = "4.2.0"
26-
# # Optional: Blender version that the extension does not support, earlier versions are supported.
27-
# # This can be omitted and defined later on the extensions platform if an issue is found.
2824
# blender_version_max = "5.1.0"
2925

30-
# License conforming to https://spdx.org/licenses/ (use "SPDX: prefix)
31-
# https://docs.blender.org/manual/en/dev/advanced/extensions/licenses.html
3226
license = [
3327
"SPDX:GPL-2.0-or-later",
3428
]
35-
# Optional: required by some licenses.
3629
copyright = [
3730
"2025 Bradley Walker"
3831
]
3932

40-
# Optional list of supported platforms. If omitted, the extension will be available in all operating systems.
41-
# platforms = ["windows-x64", "macos-arm64", "linux-x64"]
42-
# Other supported platforms: "windows-arm64", "macos-x64"
43-
44-
# Optional: bundle 3rd party Python modules.
45-
# https://docs.blender.org/manual/en/dev/advanced/extensions/python_wheels.html
46-
# wheels = [
47-
# "./wheels/hexdump-3.3-py3-none-any.whl",
48-
# "./wheels/jsmin-3.0.1-py3-none-any.whl",
49-
# ]
33+
platforms = ["windows-x64", "macos-arm64", "linux-x64"]
34+
# wheels = []
5035

51-
# Optional: add-ons can list which resources they will require:
52-
# * files (for access of any filesystem operations)
53-
# * network (for internet access)
54-
# * clipboard (to read and/or write the system clipboard)
55-
# * camera (to capture photos and videos)
56-
# * microphone (to capture audio)
57-
#
58-
# If using network, remember to also check `bpy.app.online_access`
59-
# https://docs.blender.org/manual/en/dev/advanced/extensions/addons.html#internet-access
60-
#
61-
# For each permission it is important to also specify the reason why it is required.
62-
# Keep this a single short sentence without a period (.) at the end.
63-
# For longer explanations use the documentation or detail page.
64-
#
65-
# [permissions]
66-
# network = "Need to sync motion-capture data to server"
67-
# files = "Import/export FBX from/to disk"
68-
# clipboard = "Copy and paste bone transforms"
36+
# Declare necessary permissions
37+
[permissions]
38+
files = "Export mesh files to the specified directory"
6939

70-
# Optional: build settings.
71-
# https://docs.blender.org/manual/en/dev/advanced/extensions/command_line_arguments.html#command-line-args-extension-build
7240
# [build]
73-
# paths_exclude_pattern = [
74-
# "__pycache__/",
75-
# "/.git/",
76-
# "/*.zip",
77-
# ]
41+
# paths_exclude_pattern = []
7842

79-
# Add-on features for search filters
8043
[features]
8144
workspace = true
8245
ui = true

0 commit comments

Comments
 (0)