18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 10:37:07 +01:00
Commit Graph

2 Commits

Author SHA1 Message Date
maj00r 107cc3c927 feat(editor): the EU07M window edits in 3D, holds vehicle parts and adds lights
The window of an EU07M model gets tabs: the tree of the nodes beside
the properties of the node picked, the parts of the vehicle, the clips
and channels, and the components of the model. The texts are Polish in
lang/editor_pl.po.

- With nothing selected, it shows the model of the vehicle driven (its
  body or its cab).
- In the 3D view the node picked is framed and shows its axes and a
  gizmo to move or turn it. The light sources are marked in their colour,
  a spot with its axis, and a click on a mark picks its node. A press on
  the gizmo or a mark doesn't pick a scenery node, and the editor's own
  gizmo gives way. A double click in the tree flies the camera there.
- The settings of a node: its position, rotation (degrees) and scale,
  and the distances it is drawn from and up to.
- "Add a light source here" puts in a node light_<n> with a point or
  spot LGHT as the last child of the node. eu07m::insert_node moves
  every reference to the nodes after it, and eu07m::add_component
  appends a component; both have unit tests.
- Changes show at once on the model the game has, through new TModel3d
  methods for the editor (ApplyEU07MLight, AddEditorLight,
  SetEditorTransform, SetEditorRange). The spot's cones are edited as
  half angles in degrees.
- Parts of the vehicle: the editor holds the lamps, coupler hooks and
  hoses in their _off/_on/_xon state, and the pantographs up or down,
  whatever the vehicle does. A held pantograph moves at its own pace,
  in the editor too, up to the wire above it. Only the look changes:
  the electrics of the vehicle don't.
- Neither the empty-scenery line nor the no-tracks hint shows in a
  scenery of models alone.
- New editor self-test command: modelnode <name>.
2026-11-29 18:11:38 +01:00
maj00r 07b902d034 feat(editor): a window to see and edit the components of an EU07M model
Selecting a scenery model loaded from an .eu07m file opens the "EU07M
model" window: the tree of the nodes with their transforms and the
components aimed at each of them, then the components of the model.

- The fields of SOCK, JOIN, CHNL (with its bindings), LGHT, LSLT, EMIT,
  COLL and MREF are edited; the other components are shown by size.
- The clip flags are edited, and a time slider holds the instance at a
  pose (time stands still in the editor); TAnimModel::play_clip takes
  the second to start from.
- Channel sliders try the channels on the instance without changing
  the file.
- "Save the model" validates the model and writes the file through a
  temporary one; the family store is kept. "Read it again" drops the
  changes.

The geometry, the mapping and the materials aren't edited. The Polish
texts of the window are added to lang/editor_pl.po.
2026-11-29 15:18:35 +01:00