Commit Graph

890 Commits (master)

Author SHA1 Message Date
Dave Corley 33ce7782e9 Feat(worldspacewidget.cpp): Add shortcut to clear selection 1 year ago
Dave Corley a7f8ee1106 Feat(instancemode.cpp): Implement save/load selection group functions 1 year ago
Dave Corley 23e75bed8f Feat(object.cpp): Make object outline an optional argument when selecting it 1 year ago
Dave Corley f287914f1e Feat(cell.cpp): Add select/unhide functions in cell.cpp 1 year ago
Dave Corley 8edc148418 Feat(CS): Implement select/unhide functions into interior & exterior
worldspace widgets
1 year ago
Dave Corley 94eadd436d Feat(worldspacewidget.cpp): Implement shortcut for visibility switching
& unhiding all instances
1 year ago
Dave Corley 9d155afc15 Feat(worldspacewidget.hpp): Add virtual decs for selection functions 1 year ago
Dave Corley cf098033b9 Feat(Mask.hpp): Add mask for hidden objects 1 year ago
Dave Corley bc662aeb63 Fix(CS): Fix minor issue in deleteSelectedInstances impl which caused it
to run twice
1 year ago
Dave Corley 7069a970ae Feat(CS): Implement instance cloning 1 year ago
elsid 08902371b4
Use settings values for Shaders settings 1 year ago
elsid 053a3caf7b
Pass cache expiry delay to GenericResourceManager constructor 1 year ago
elsid 28614730da
Pass land reference to LandObject constructor 1 year ago
elsid 2a49919b53
Move esm3terrain to esmterrain 1 year ago
Andrei Kortunov 0723b44a65 Do not copy QVectors twice 1 year ago
Andrei Kortunov 35561450f1 Do not copy osg::ref_ptr when possible 1 year ago
Andrei Kortunov d3d7a663c6 Move some objects instead of copying 1 year ago
Evil Eye 6b7e7acd16 Replace a number of incorrect index types 2 years ago
psi29a df57f8004b Merge branch 'default' into 'master'
Replace some empty constructors and destructors with default

See merge request OpenMW/openmw!3078
2 years ago
Evil Eye 9214ffb50b Replace some empty constructors and destructors with default 2 years ago
florent.teppe ad8cfde4e0 ESM::LandData no longer a virtual interface
instead it is constructed from ESM::Land or ESM4::Land
2 years ago
fteppe 22dc383f63 fixes errors and warnings
Applies review comments

getWorldspaceTerrain => returns a reference because never null
crashfix in navigator
updateLandPositions fixes naming of it
const ESM4::Land* MWWorld::Store<ESM4::Land>::search(ESM::ExteriorCellLocation cellLocation) const removes useless else
ExteriorCellLocation uses default initializers
get terrain height returns -MAX_FLOAT when there is no esm4 terrain.

applied review comments

use default initlializer when possible
factorise code
uses pattern matching in for loop.
2 years ago
florent.teppe e0fa15b727 Abstracted Land data that can be used by esm3 and esm4. 2 years ago
florent.teppe 1b718f09c5 adding worldspace info to terrain data structures
Rendering manager can have multiple terrain, one for each queried worldspace
Terrain::World has a worldspace member
storage functions require a worldspace parameter.
2 years ago
florent.teppe 93e7b0d946 Terrain has a mandatory worldspace in constructor
getTerrainHeightAt takes a worldspace.

Doesn't change anything for now => Therrain is created with the default ESM3 worldspace, and is never changed.
2 years ago
jvoisin c7a3f43915 Minor header cleanup
This has been done via CLion's "unused include directive",
set to "detect completely unused".
2 years ago
florent.teppe cb4a97e50b Displays references in exterior cells. A bit hackish. 2 years ago
psi29a 4fd8ed8f13 Merge branch 'qt_scene' into 'master'
Migrate from GraphicsWindowQt to QOpenGLWidget

See merge request OpenMW/openmw!2895
2 years ago
Evil Eye 8d8207b734 Refactor pathgrid indices to use size_t instead of int 2 years ago
Andrei Kortunov 3e9cedf3b5 Use a compile-time check 2 years ago
Andrei Kortunov 8df7ce545e Migrate from GraphicsWindowQt to QOpenGLWidget 2 years ago
Shi Han a90e3b8c3b Move from std::atoi to std::from_char 2 years ago
elsid d03bec60e9
Avoid redundant conversion from RefId to string and back 2 years ago
elsid 419a86f0b9
Use ESM::RefId for actor parts
To avoid redundant conversion RefId to string and back.
2 years ago
elsid e618026c69
Use ESM::RefId as index key in collections 2 years ago
florent.teppe 486d15b19e moved light common to its own file
moved esm4light to it's own file
2 years ago
florent.teppe dc961e3189 Adds the light into the scene.
Common struct for ESM3 and ESM4 light
2 years ago
Andrei Kortunov 7e2aedf637 Add an initial Qt6 support 2 years ago
florent.teppe 6ff90b34a8 Fixed an issue with RefId in CellRefs where Ids wouldn't be loaded
Fixed multiple issues from the review.
2 years ago
florent.teppe 0f3499f504 Renamed string => Id, makes more sense considering the new underlying type
Fixes unnecessary copies, and issues with case sensitive comparisons.

fixed modification that wasn't necessary

Fixed type mismatch, and unecessary copy
2 years ago
florent.teppe 30a020883e Avoids unecessary copies
Fixed issue with lowerCase

Oups fixed compialtion on openMW_test_suite
2 years ago
florent.teppe 65cdd489fb create a specific esm reader function for RefID to avoid allocation for string and then again for RefId
Fixed some types

removed useless header

applied clang format

fixed compile tests

fixed clang tidy, and closer to logic before this MR

Removed hardcoded refids

unless there is a returned value we don't use static RefIds
can use == between RefId and hardcoded string

Fix clang format

Fixed a few instances where std::string was used, when only const std::string& was needed

removed unused variable
2 years ago
fteppe 09d461a8cd fixed Topic selected event
Fix rebase
2 years ago
fteppe 20da0892ef openMW_test_suite compiles and runs
Slowly moving through the open-cs errors

Good progress in openCS

Very good progress on openCS

Getting closer with openCS

OpenCS compiles and runs! Didn't have time to test it all though

ix openMW

everything compiles on windows??

Fix gcc

Fix Clang
2 years ago
Max Henzerling 897cdc62d8 Add snap to reference 2 years ago
jvoisin 1a326294c0 Run IWYU on the opencs 2 years ago
jvoisin cd29c181cf Another pass with IWYU 2 years ago
elsid 843753da14
Remove unused includes 2 years ago
jvoisin 3cbf1dc042 First pass with include-what-you-use 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
Evil Eye fb9bc5f535 Use string_view in Fallback::Map 2 years ago
mpeco 78700eee57 functor-based Qt signal-slot syntax construction set 2 years ago
elsid b3882777ab
Cleanup opencs includes 2 years ago
psi29a b551e69b6f #5534 remove OSG 3.4 support and require at least 3.6.5 support 2 years ago
elsid f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2 years ago
Andrei Kortunov de58c9dff3 Get rid of obsolete osg::Geode where it is possible 2 years ago
elsid 7501597813
Do not use float as loop variable
apps/opencs/view/render/instanceselectionmode.cpp:294:9: warning: Variable 'i' with floating point type 'float' should not be used as a loop counter [clang-analyzer-security.FloatLoopCounter]
        for (float i = 0.0; i <= resolution; i += 2)
        ^                   ~                ~
3 years ago
elsid bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
3 years ago
jvoisin 8b9ed57348 Clean up Qt includes 3 years ago
Cody Glassman ce49aa1202 Attach lights at origin when missing AttachLight node 3 years ago
Evil Eye db1a372e5b Replace new with make_unique in opencs 3 years ago
Evil Eye a64979e25d Replace empty std::string assignments 3 years ago
Vidi_Aquam 035fe778b2 Temporary workaround for angle snapping
Made the angle snap only apply to an object when the drag is finished, which is much more usable until the rotation system can be fixed completely
3 years ago
Vidi_Aquam abf0c8048e Change reading of settings and add missing logic to mouse wheel drag 3 years ago
Vidi_Aquam 6d7c8f25fc Implement grid snapping and angle snapping in OpenMW-CS
Adds configurable snap settings for instance movement, rotation and scaling, used with the secondary edit button
3 years ago
Bret Curtis 74e7cfc023 remove unused includes: part1
remove unused imports: part2

revert one tidy we will keep for c++20
3 years ago
Bret Curtis cdbab2325f rename esmterrain to esm3terrain 3 years ago
Bret Curtis d1fb854521 move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4
esm typo

esm typo
3 years ago
Cody Glassman 8ec0a52605 Toggable day night switch (#5928) 3 years ago
Alexei Dobrohotov 7a0c13fcf8 Make better use of std::clamp 3 years ago
Bo Svensson c9c8d02332
fixes a crash (#3183)
This PR fixes a crash caused by the improperly ensured lifetime of RigGeometry::mSourceGeometry. mSourceGeometry was not adequate to ensure mSourceGeometry would outlive mGeometry because we extend mGeometrys lifetime beyond this lifetime by passing mGeometry to the draw traversal instead of this.
In addition,

We add important comments.
We detect and prevent generally unsafe operations in high level code.
We add a sprinkling of const to help clarify intentions.
3 years ago
unelsson 14c4bba4a3 Remove unused include 3 years ago
unelsson 28278e9a82 Drawing duplicate lines is faster than iterating through big containers 3 years ago
unelsson 55456a19fc Only iterate through temporary selection when using toggle 3 years ago
unelsson 46960825ef Various terrain selection and editmode dragging fixes 3 years ago
unelsson 89a20b6ea5 Call dragEnded instead of pressed also after aborted operation 3 years ago
unelsson 3df9ceda03 Remove measurement code 3 years ago
unelsson 7602d677fa Terrain selection optimizations, measurements, renderBin change 3 years ago
Matjaž Lamut 1c9f06f742 Minor UI tweaks all around OpenMW-CS 3 years ago
psi29a e2e5161d81 Merge branch 'optimizebrushdraw' into 'master'
Optimize terrain editing brush drawing performance

Closes #6285

See merge request OpenMW/openmw!1226
3 years ago
Evil Eye 831055f878 Merge branch 'OpenCS-fix-modify' into 'master'
OpenCS - Re-implement the fix for Issue #6067.

See merge request OpenMW/openmw!1173
3 years ago
unelsson 70e210735a Optimize terrain editing brush drawing performance 3 years ago
elsid 6b7434ca69
Pass std::string_view instead of const std::string&
* Starting with Actor::getBodyPartMesh and ending with
  Misc::StringUtils::ciEqual.
* Add tests for Misc::StringUtils::ciEqual.
3 years ago
psi29a 6170971ea3 Merge branch 'bettermoveinstance' into 'master'
Set instance movement based on camera zoom

See merge request OpenMW/openmw!1186
3 years ago
elsid a8c16071dc
Fix -Wreturn-local-addr warning
/home/elsid/dev/openmw/apps/opencs/model/world/actoradapter.cpp: In member function ‘const string& CSMWorld::ActorAdapter::ActorData::getPart(ESM::PartReferenceType) const’:
/home/elsid/dev/openmw/apps/opencs/model/world/actoradapter.cpp:142:20: error: returning reference to temporary [-Werror=return-local-addr]
  142 |             return "";
      |                    ^~
3 years ago
unelsson f876ff2c14 Clear temporary movement data at the end of the drag 3 years ago
unelsson 53d315c862 XYZ-locking, mouse wheel move fix 3 years ago
unelsson 23fe3d74ab Use floats, not doubles 3 years ago
unelsson 840e7615f5 Store object origins and move difference 3 years ago
unelsson 0d511da615 Test of basic mouse-plane use 3 years ago
cc9cii b0d5ca386d Update original cell column and do not modify the refnum when moving a reference to another cell with 3D editing. 3 years ago
psi29a 716eebe616 Merge branch 'terrainselectioncrashfix' into 'openmw-47'
Fix terrain selection crash

See merge request OpenMW/openmw!1165

(cherry picked from commit ec4e3b04a7)

b84e41bd Avoid storing ref, dynamic cast worldspacewidget for safety
d62ddc00 Use QPointer to detect object existence, less verbose debug messages
cb42b528 Remove friend, make getEditMode public to allow editmode testing.
4b148180 Restucture code
08f7c73e Fix text
3 years ago
elsid 8d2cdedc87
Show number of pathgrid node in a tooltip
To allow users faster understand what node it is.
4 years ago
Atahualpa 3a1243a5d0 Rebased branch, reduced code duplication, added comments, adjusted formatting. 4 years ago
Atahualpa ca80aeaaea Fix vertex calculation for cell-border drawing. 4 years ago
Atahualpa 356efa15a2 Fixes #6035 (circle brush selects outside of circle) and #6036 (some corner vertices not selected). 4 years ago
Atahualpa 7be891b440 Directly use Geometry instead of Geode; fix for loop; add size_t type-cast. 4 years ago
Atahualpa 6c49074765 Remove old references to Cell class. 4 years ago
Atahualpa 008bf64dd9 Second step toward fixing terrain selection issues. 4 years ago
Atahualpa 18ea4d8eb2 First step toward fixing terrain selection issues. 4 years ago