API ReferenceGE Extensionseditor
Particle Editor
Visual editor for ParticleEmitterData and ParticleData datablocks with live preview.
Visual editor for ParticleEmitterData and ParticleData datablocks with live preview.
Overview
Provides an edit mode for creating, editing, saving, and deleting particle emitters and their particle data. Spawns a live ParticleEmitterNode in the scene for real-time preview. Supports undo/redo for all CRUD operations on datablocks.
Public Functions
| Function | Signature | Description |
|---|---|---|
M.onEditorInitialized | () | Registers particleEditMode and custom field inspectors |
M.onExtensionLoaded | () | Logs initialization |
M.onExtensionUnloaded | () | Cleans up the editable emitter node |
M.onEditorInspectorHeaderGui | () | Renders emitter/particle tabs with combo selectors and action buttons |
M.onEditorInspectorFieldChanged | (selectedIds, fieldName, fieldValue, arrayIndex) | Marks datablocks as dirty and reloads them |
Key Internal Functions
| Function | Description |
|---|---|
updateDatablockList() | Scans all datablocks for ParticleEmitterData and ParticleData |
selectEmitter(emitter) | Sets the current emitter on the preview node |
newEmitter() / deleteEmitter(emitter) | Create/delete emitter datablocks with undo/redo |
newParticle() / deleteParticle(particle) | Create/delete particle datablocks with undo/redo |
saveEmitter(emitter) | Saves emitter and all its particles to their files |
saveEmitterToLevel(emitter) | Saves emitter+particles to the current level's default path |
loopParticles(emitter, fct) | Iterates over all ParticleData referenced by an emitter |
customParticlesFieldEditor(...) | Custom inspector UI for the particles field (up to 4 slots) |
customTextureFieldEditor(...) | Custom inspector UI for particle texture file selection |
Usage Example
-- Activate the Particle Editor edit mode from the editor toolbar
-- Select an emitter from the dropdown
-- Modify emitter/particle properties in the Inspector
-- Use Save button to persist changes to filesNotes
- Maximum 4 particles per emitter (tab-separated in the
particlesfield). - The preview emitter node (
editableEmitterNode) is placed 7 units in front of the camera. - Unsaved changes are indicated by
UnsavedDocumenttab flags. - Prompts user to save when switching between dirty emitters/particles.
See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide