Tutorial: Loading a Scene
Open an existing .mc3.xml file, explore it, and make edits.
Opening a File
Method 1: Command-line argument
./cmake-build-debug/MeshCraft test/house.mc3.xml
The file is loaded immediately on startup. The window title shows the file name.
Method 2: In-editor dialog (Ctrl+O)
- Press
Ctrl+Oor use File → Open. - An in-editor text field appears. Type the path to the file and press Enter.
Method 3: Recent Files
Use File → Open Recent to see the last 10 opened files. The list is persisted at ~/.config/meshcraft/recent.txt.
Exploring the Scene
Hierarchy Panel (left)
- Shows a recursive tree of all objects in the scene.
- Click the triangle next to a group or CSG node to expand/collapse its children.
- Click any object to select it. The selected object is highlighted in the viewport.
- The eye icon toggles visibility without deleting the object.
Properties Panel (right)
- Shows the selected object's name, type, position, rotation, scale, material, and type-specific parameters.
- Click on the Lights, Cameras, Textures, Materials, or Defs tabs to see other scene data.
Viewport
- Middle-drag: orbit the camera.
- Right-drag: pan.
- Scroll wheel: zoom.
- Left-click: select an object.
- F: focus camera on selected object.
The House Test Scene
The repository includes a simple test scene at test/house.mc3.xml:
<mc3 version="0.1" model="House">
<!-- sky-blue background + linear fog -->
<!-- ambient + directional sun -->
<!-- 4 materials: brick, stone, roof, ground -->
<objects>
<group name="House">
<box name="FrontWall" size="10 4 0.3" …/>
<box name="BackWall" …/>
<box name="LeftWall" …/>
<box name="RightWall" …/>
<box name="Floor" …/>
<box name="Roof" …/>
</group>
<cylinder name="LeftColumn" …/>
<cylinder name="RightColumn" …/>
<sphere name="Ornament" …/>
<plane name="Ground" …/>
</objects>
</mc3>
Making Edits
- Select the "House" group in the hierarchy and press
Gto activate the Move gizmo. Drag to reposition the entire house. - Click on "Ornament" and press
Rfor Rotate — drag the gizmo rings to rotate. - Ctrl+click to multi-select several walls, then press
Sto scale them together. - Press
Ctrl+Zto undo any changes.
Saving
Ctrl+S: save to the current file (overwrites the original).Ctrl+Shift+S: Save As — opens a dialog to specify a new path.
The editor modifies the scene in memory. Until you save, your changes are only in RAM. The undo stack (max 20 steps) is also in RAM only — closing the editor without saving loses all changes.