Setup Editor Features
The RODENT Setup Editor provides controls for configuring an experiment arena before it is run.
In addition to editing individual arena objects, the Setup Editor provides bulk material controls that allow multiple regions, walls, or doors to be changed at once.
The relevant implementation is:
src/app/panels/setup_editor_panel.gd
Material Configuration
Arena objects can reference materials defined by the current arena configuration.
Materials provide both visual and physical properties.
The standard material collection includes:
solid_floor
rubber
wire_mesh
wood_chip
painted_steel
clear_acrylic
Each material has a display name that is shown in the editor.
Bulk Material Change
The Setup Editor contains a:
Bulk Material Change
section.
The section provides two controls:
Target
Material
and an Apply button.
Bulk Change Targets
The target selector supports:
All Walls
All Regions
All Doors
This allows the user to apply a single material selection to every object of the selected type.
All Walls
Selecting:
All Walls
changes the material_id of every configured wall.
Conceptually:
Wall 1 ─┐
Wall 2 ─┤
Wall 3 ─┼──► selected material
Wall 4 ─┤
Wall 5 ─┘
All Regions
Selecting:
All Regions
changes the material_id of every configured region.
All Doors
Selecting:
All Doors
changes the material_id of every configured door.
Applying a Bulk Material Change
The workflow is:
Choose target
│
▼
Choose material
│
▼
Apply
│
▼
Update arena configuration
│
▼
Refresh preview
The editor updates the arena configuration and triggers the preview update.
Undo and Redo
Bulk material changes participate in the editor's undo/redo mechanism.
Before changing materials, the editor pushes an undo state.
After a successful change:
Undo state
│
▼
Material update
│
▼
Redo history cleared
This allows a bulk change to be reversed through the normal editor undo functionality.
Running State Restriction
Bulk material changes cannot be performed while the experiment is running.
If the application is currently running, the editor reports:
Cannot change materials while running.
This prevents configuration changes from being applied to the arena while the simulation is actively executing.
The material controls are therefore intended for experiment setup rather than live simulation configuration.
Outer Wall Material
The Setup Editor also provides a dedicated:
Outer Wall Material
control.
The user can select a material and apply it specifically to the outer arena enclosure.
This is separate from the bulk wall selector because the outer walls are part of the arena boundary rather than the collection of inner walls.
Applying the Outer Wall Material
The workflow is:
Choose outer wall material
│
▼
Apply
│
▼
arena.outer_wall_material_id
│
▼
Preview update
The selected material is stored as:
"outer_wall_material_id": "clear_acrylic"
or another valid material ID.
Running State Restriction
Outer wall material changes are also disabled while the experiment is running.
The editor therefore maintains a consistent rule:
Configuration editing
│
├── allowed before run
│
└── disabled during run
This avoids modifying arena configuration while simulation execution is in progress.
Material Picker
The material picker is populated from the arena's configured materials.
Each material is presented using its:
display_name
rather than requiring the user to remember the internal material ID.
For example, the user can select:
Clear Acrylic
while the underlying configuration uses:
clear_acrylic
This separates the user-facing editor terminology from the internal configuration identifiers.
Preview Updates
Material changes trigger the experiment preview update.
The editor emits the appropriate preview-change notification after modifying the arena configuration.
This allows the arena renderer to display the updated material without requiring the user to manually rebuild the experiment.
The general flow is:
Setup Editor
│
▼
Change arena configuration
│
▼
Preview changed
│
▼
Arena renderer
│
▼
Updated 3D appearance
Configuration Fields Affected
The bulk controls update the following fields:
Regions
arena.regions[*].material_id
Walls
arena.inner_walls[*].material_id
Doors
arena.doors[*].material_id
Outer Walls
arena.outer_wall_material_id
The controls therefore modify the preset-style arena configuration rather than directly manipulating individual 3D meshes.
Example
Suppose an arena contains:
5 walls
4 regions
3 doors
The user can select:
Target: All Walls
Material: Painted Steel
and apply the change.
The resulting configuration changes the material reference for all five walls.
The four regions and three doors remain unchanged.
If the user instead selects:
Target: All Doors
Material: Clear Acrylic
only the three doors receive the new material.
The same principle applies to:
All Regions
Relationship to the 3D Renderer
The Setup Editor does not independently draw the arena geometry.
Instead, it changes the arena configuration.
The 3D renderer then uses that configuration when constructing the arena.
Setup Editor
│
│ material_id changes
▼
Arena configuration
│
▼
Arena3D
│
▼
Material definition
│
▼
3D material
This keeps the editor and renderer data-driven.
Recommended Workflow
For a new experiment:
- Open the Setup Editor.
- Configure the arena regions.
- Configure walls and doors.
- Select materials for individual objects where required.
- Use Bulk Material Change when many objects should share one material.
- Use Outer Wall Material for the enclosure boundary.
- Review the 3D preview.
- Save the experiment configuration.
- Run the experiment only after the arena configuration is complete.
Material configuration should be completed before starting the simulation because these configuration controls are disabled while the experiment is running.
Implementation
The bulk material functionality is implemented in:
src/app/panels/setup_editor_panel.gd
The relevant functionality includes:
_build_bulk_material_controls()
_apply_bulk_material()
_refresh_bulk_material_picker()
The renderer that consumes the resulting material configuration is:
src/app/arena_3d.gd
The material defaults are maintained by:
src/app/services/experiment_migrator.gd
Together these components provide the flow:
Material definitions
│
▼
Setup Editor
│
▼
Arena configuration
│
▼
3D preview