* qtFRED: rotate around the centre of a multi-selection
Rotate Around Object (Alt+R) and the orbit pivot both used the current
object's position, so with several ships marked the camera still
circled whichever one happened to be current. Add
EditorViewport::selectionCenter(), which returns the centroid of the
marked objects when more than one is marked and the given object's
position otherwise, and use it at the three places that chose the
point: the look-at camera update, orbitCameraGetPivot(), and the Alt+R
handler that turns the camera toward the target when the mode is
switched on.
orbitCameraGetPivot() also serves middle-mouse orbit and wheel zoom in
normal mode, so those pivot on the selection centre as well. Every
marked type counts at full weight, including waypoints and jump nodes.
With a single object marked nothing changes.
Fixes#7724
* Make EditorViewport::selectionCenter const
It only reads the marked-object list and the editor's marked count;
clang-tidy (readability-make-member-function-const) flagged it in CI.
* Mirror the multi-selection orbit pivot to FRED, trim comments
FRED gets the same selection_center() as qtFRED's selectionCenter(),
used at the same three places: the look-at camera update, the orbit
pivot, and the Rotate Around Object toggle. Also removes the qtFRED
comments flagged in review.
* Make the selection-center pivot optional and share object bounds
Look-at and orbit use the current object again unless the new option is
on (qtFRED: Preferences > Controls; FRED: View menu), and the selection
center is now the bounding-box midpoint. view_universe in both editors,
the pivot, and qtFRED's selection radius all use get_object_bounds() in
missioneditor/common.
* Reset the cached orbit pivot when the selection-center option changes
Wheel zoom reuses the orbit pivot until the camera moves, so without this
the option only took effect for scrolling after the next camera move.
* Address review: move and rename the selection-centroid option
- FRED: the option moves from the View menu to Settings (and Misc in the
classic layout), under Move Ships When Undocking, with hover help, and is
renamed Rotate Around Selection Centroid.
- qtFRED: the checkbox moves next to Move Ships When Undocking in the
preferences dialog, with the same name.
- setOrbitSelectionCenter only resets the orbit when the value changes.
- get_object_bounds iterates with list_range.
- The bounds test resets the object system with obj_init and takes objects
off the free list, so it leaves a valid state for other tests.
* Rename the option to Selection Midpoint, move it to qtFRED's Controls tab, and document it
* Fix overlapping Appearance rows in qtFRED Preferences, realign a settings line
The last commit renumbered the Viewport label size row of the Appearance
group from 4 to 3, which is the Long list menu style row, so the label
size pair fell out of the layout and its spin box drew over the group
title. Put it back at row 4.
---------
Co-authored-by: Dustinspace217 <[email protected]>
The text labels drawn in the main editor viewport were always rendered at the fixed FONT1 size. Add options to scale the font from 50% to 400%.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
PR #7082 rearranged the FRED2 menu layout to match qtFRED (see issue #6985),
but some users preferred the previous Editors/Misc layout. This adds a
"Classic menu layout" toggle (under Settings in the current layout, and under
Misc in the classic layout) that swaps the whole menu bar on demand. The
choice is persisted to the registry and reapplied on startup.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Never called from anywhere, even dating back to retail FRED. It also
contained a latent bug: add_pending_message was missing a break, so it
would have filled every free slot in the buffer with the same message.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A few visual improvements requested on Discord:
1. Use a configurable LOD to draw the outline wireframe, defaulting to LOD 1
2. Draw subsystem names with a dark outline to make them more visible
3. Draw the subsystem boundary boxes with thicker lines
* new qtfred error checker
* fix some issues
* clang
* more clang
* clean up and fixes
* missed a comment
* add help documentation
* surface auto corrected issues more clearly
* some cleanup
Convert `debriefing_editor_dlg` from a modal stack-allocated dialog to a modeless heap-allocated dialog, matching the pattern of the briefing editor. Update FRED infrastructure accordingly.
Add `focus_sexp(int node)` to `debriefing_editor_dlg`, mirroring the existing method in `briefing_editor_dlg`. Fix both `focus_sexp()` implementations to search all team debriefings/briefings instead of only the currently selected team, so nodes in non-zero teams are found correctly in TVT missions.
Fix `debriefing set_modified()` calls to only set the flag if the debriefing data actually changes, rather than every time the editor was opened.
* First draft of prop object type
* Add prop editor dialog in FRED
* prop sexps
* lua table prop support
* lab support
* lua mission access to props
* prop collision support
* use std::optional so the object->instance id is always valid
* allow props to block suns
* minor cleanup and remove arbitrary limit. Still limited to 500 objects.
* Sort props by category
* cleanup
* implement collision hooks
* parse prop flags and further ensure props are inited and closed correctly
* Add Cyborg's multi suggestions
* fix missing header
* add props to empty slots if available
* add multi signature
* fix rebase issues and match collisions to the new multithread style
* appease Clang the Conquerer
* save/parse mission prop classes by name
* Clean up comments and finish TODOs
* fix string errors
* clang wants this to be static now
* address feedback
* address feedback
* Use model num from prop info instead
* merge prop and ship collision group sexps together
* fix rebase bug
* address feedback
* fix name shadowing
* ship heavy submodel
* clang
---------
Co-authored-by: Asteroth <[email protected]>
At some point between 2002 and 2006, the Update_window code was removed, but since we don't have FRED history from that period, we don't know the exact rationale. However, since FRED appears to have no difficulty rendering every frame, and since there may be parts of FRED that don't set Update_window when they need to (for example, the background editor), let's keep this disabled.
Follow-up to #6435. Fixes the background not updating when a bitmap is moved in the background editor.
FRED has code to keep track of whether the main window should be rerendered on each frame. It looks like this was accidentally removed at some point.
(Discovered by comparing FRED source files while investigating #5568.)
The crash in #5514 appears to be caused by some of the graphics code not being in the expected state for the synchronization. Looking at the code in `render_frame()`, a `gr_flip()` happens after one frame ends and before the next frame begins. That implies that this `gr_flip()` should not be here, as it is in the middle of a frame. For additional evidence, `gr_flip()` modifies the "uniform buffer manager" state, and that is part of the stack trace preceding the crash. Removing this `gr_flip()` fixes the crash.
The strange thing is that this code *doesn't run at all* while the campaign editor is active. I verified this by adding a MessageBox in place of `gr_flip()`; the MessageBox doesn't display until the campaign editor is exited. And yet, FRED crashes with `gr_flip()` present and doesn't crash with it removed. This calls for a new category of bug; I propose "spookybug", from spooky action-at-a-distance.
Fixes#5514.
* initial semi-working version
* better implementation of play and add stop and music.tbl viewer
* let the music window lose focus
* some cleanup
* add autoplay, next, previous
* use graphics
* Better dialog layout and allow ignoring files from the player list
* Make betterer
* a touch more cleanup
* revert this change
* missing bracket from merge conflict resolution
* address feedback
1) Fixes the ship and wing dialog resizing for both sexp help and arrival/departure cues
2) Restores the sexp help in the Mission Goals dialog, which had been broken since the mini-help-box was added
This mostly meant for special docker standalone server builds where it
might be useful to have full release performance but also have the logs
available if necessary. This now always compiles the log statements but
enables or disables them with a constexpr so they should not appear in
actual release binaries.