Skip to content

Commit 7861761

Browse files
committed
Release v2.2.0
1 parent 989ced7 commit 7861761

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+23826
-63
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ If a copy of the MPL was not distributed with this file, You can obtain one at h
2424
2525
-->
2626

27+
## [2.2.0] Ramses 28.2 update
28+
* **File version number has changed. Files saved with RaCo 2.2.0 cannot be opened by previous versions.**
29+
* **Export now supports Ramses feature levels up to 2. Scenes exported with feature level 2 can't be opened with Ramses before v2.2.0.**
30+
31+
### Changes
32+
* Updated Ramses from v28.0.0 to v28.2.0.
33+
* Scenes exported with feature level 2 can be merged in Ramses. The `ramses-viewer` is now able to load and merge several exported files.
34+
* Starting at feature level 2 uniform buffers objects with predefined semantics are supported as specified in the documentation.
35+
36+
2737
## [2.1.0] Render View, Python Console, Performance Table, Misc Improvements and Bugfixes
2838
* **File version number has changed. Files saved with RaCo 2.1.0 cannot be opened by previous versions.**
2939

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.19)
1111

1212
SET(CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo")
1313

14-
project(RaCoOS VERSION 2.1.0)
14+
project(RaCoOS VERSION 2.2.0)
1515

1616
SET(RACO_RELEASE_DIRECTORY ${CMAKE_BINARY_DIR}/release)
1717

EditorApp/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ set_target_properties(RaCoEditor PROPERTIES OUTPUT_NAME "RamsesComposer" RUNTIME
4343
set(RACO_RELEASE_ROOT_FILES
4444
${CMAKE_SOURCE_DIR}/README.md
4545
${CMAKE_SOURCE_DIR}/CHANGELOG.md
46-
${CMAKE_SOURCE_DIR}/third_party/ramses-logic/tools/migrate/migrate_to_v1_0.py
4746
)
4847

4948
create_folder_structure("${RACO_RELEASE_ROOT_FILES}" ${RACO_RELEASE_DIRECTORY} RaCoPrepareReleaseFolder)

HeadlessApp/tests/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ set_tests_properties(RaCoHeadless_load_no_such_file PROPERTIES WILL_FAIL True)
2222
add_racocommand_test(RaCoHeadless_load_future_version "${CMAKE_CURRENT_BINARY_DIR}" "-p" "${CMAKE_SOURCE_DIR}/resources/future-version.rca")
2323
set_tests_properties(RaCoHeadless_load_future_version PROPERTIES WILL_FAIL True)
2424

25+
add_racocommand_test(RaCoHeadless_load_future_feature_level "${CMAKE_CURRENT_BINARY_DIR}" "-p" "${CMAKE_SOURCE_DIR}/resources/future-feature-level.rca")
26+
set_tests_properties(RaCoHeadless_load_future_feature_level PROPERTIES WILL_FAIL True)
27+
2528
add_racocommand_test(RaCoHeadless_load_no_json "${CMAKE_CURRENT_BINARY_DIR}" "-p" "${CMAKE_SOURCE_DIR}/resources/no-json.rca")
2629
set_tests_properties(RaCoHeadless_load_no_json PROPERTIES WILL_FAIL True)
2730

PyAPITests/pyt_general.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,15 @@ def test_load_raco_2x_feature_levels(self):
101101
raco.load(self.cwd() + "/../resources/empty-raco-2x-fl1.rca", raco.maxFeatureLevel())
102102
self.assertEqual(raco.projectFeatureLevel(), raco.maxFeatureLevel())
103103

104-
# TODO check that feature level downgrade is not possible:
105-
# currently can't be tested since max feature level is 1
104+
raco.load(self.cwd() + "/../resources/empty-raco-2x-fl2.rca")
105+
self.assertEqual(raco.projectFeatureLevel(), 2)
106+
107+
# Feature level downgrade fails:
108+
with self.assertRaises(RuntimeError):
109+
raco.load(self.cwd() + "/../resources/empty-raco-2x-fl2.rca", 1)
110+
111+
raco.load(self.cwd() + "/../resources/empty-raco-2x-fl2.rca", raco.maxFeatureLevel())
112+
self.assertEqual(raco.projectFeatureLevel(), raco.maxFeatureLevel())
106113

107114
def test_save_check_object_id(self):
108115
objectInitID = self.findObjectByType("ProjectSettings").objectID()

components/libApplication/src/RaCoApplication.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ void RaCoApplication::switchActiveRaCoProject(const QString& file, std::function
156156
activeProject_ = RaCoProject::createNew(this, createDefaultScene, newFeatureLevel);
157157
} else {
158158
auto fileFeatureLevel = RaCoProject::preloadFeatureLevel(file, featureLevel);
159+
160+
// We run into this case when there is a feature level upgrade without a file version upgrade:
161+
if (fileFeatureLevel < ramses_base::BaseEngineBackend::minFeatureLevel || fileFeatureLevel > ramses_base::BaseEngineBackend::maxFeatureLevel) {
162+
throw std::runtime_error(fmt::format("Project feature level {} outside valid range ({} ... {})", fileFeatureLevel, static_cast<int>(ramses_base::BaseEngineBackend::minFeatureLevel), static_cast<int>(ramses_base::BaseEngineBackend::maxFeatureLevel)));
163+
}
164+
159165
engine_->setFeatureLevel(static_cast<ramses::EFeatureLevel>(fileFeatureLevel));
160166
activeProject_ = RaCoProject::loadFromFile(file, this, loadContext, false, featureLevel, generateNewObjectIDs);
161167
}

components/libApplication/src/RaCoProject.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,12 @@ std::unique_ptr<RaCoProject> RaCoProject::loadFromFile(const QString& filename,
413413
auto absPath = utils::u8path(info.path).normalizedAbsolutePath(p.currentFolder());
414414
p.addExternalProjectMapping(id, absPath.string(), info.name);
415415
}
416+
417+
// We run into this case when there is a feature level upgrade without a file version upgrade:
418+
if (p.featureLevel() < ramses_base::BaseEngineBackend::minFeatureLevel || p.featureLevel() > ramses_base::BaseEngineBackend::maxFeatureLevel) {
419+
throw std::runtime_error(fmt::format("Project feature level {} outside valid range ({} ... {})", p.featureLevel(), static_cast<int>(ramses_base::BaseEngineBackend::minFeatureLevel), static_cast<int>(ramses_base::BaseEngineBackend::maxFeatureLevel)));
420+
}
421+
416422
if (featureLevel != -1) {
417423
if (featureLevel >= p.featureLevel() && featureLevel <= static_cast<int>(ramses_base::BaseEngineBackend::maxFeatureLevel)) {
418424
p.setFeatureLevel(featureLevel);

components/libRamsesBase/src/ramses_adaptor/SceneAdaptor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ SceneAdaptor::SceneAdaptor(ramses::RamsesClient* client, ramses::sceneId_t id, P
4747
: client_{client},
4848
project_(project),
4949
scene_{ramsesScene(id, client_)},
50-
logicEngine_{ramses_base::BaseEngineBackend::UniqueLogicEngine(scene_->createLogicEngine(), [this](ramses::LogicEngine* logicEngine) { scene_->destroy(*logicEngine); })},
50+
logicEngine_{ramses_base::BaseEngineBackend::UniqueLogicEngine(scene_->createLogicEngine("LogicEngine_" + project->projectName()), [this](ramses::LogicEngine* logicEngine) { scene_->destroy(*logicEngine); })},
5151
subscription_{dispatcher->registerOnObjectsLifeCycle([this](SEditorObject obj) { createAdaptor(obj); }, [this](SEditorObject obj) { removeAdaptor(obj); })},
5252
childrenSubscription_(dispatcher->registerOnPropertyChange("children", [this](core::ValueHandle handle) {
5353
adaptorStatusDirty_ = true;

components/libRamsesBase/src/ramses_adaptor/SceneBackend.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ bool SceneBackend::discardRamsesMessage(std::string_view message) {
103103
if (message.find("has no outgoing links! Node should be deleted or properly linked!") != std::string::npos) {
104104
return true;
105105
}
106-
if (message.find("rendergroup does not contain any meshes") != std::string::npos) {
107-
return true;
108-
}
109106
if (message.find("Unused [uniform]") != std::string::npos ||
110107
message.find("Unused [in]") != std::string::npos ||
111108
message.find("Unused [out]") != std::string::npos) {

components/libRamsesBase/src/ramses_base/BaseEngineBackend.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ const ramses::EFeatureLevel BaseEngineBackend::minFeatureLevel = ramses::EFeatur
2020
// - feature level downgrade tests
2121
// - python api: in pyt_general.py -> test_load_raco_2x_feature_levels
2222

23-
const ramses::EFeatureLevel BaseEngineBackend::maxFeatureLevel = ramses::EFeatureLevel::EFeatureLevel_01;
23+
const ramses::EFeatureLevel BaseEngineBackend::maxFeatureLevel = ramses::EFeatureLevel::EFeatureLevel_02;
2424

2525
const std::string BaseEngineBackend::featureLevelDescriptions =
2626
R"(1 - Ramses v28.0.0
27+
2 - Ramses v28.2.0
28+
- scene merging
2729
)";
2830

2931

0 commit comments

Comments
 (0)