Skip to content

Commit 0b91d0a

Browse files
committed
Release v1.9.0
1 parent 7711416 commit 0b91d0a

File tree

471 files changed

+92390
-1240
lines changed

Some content is hidden

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

471 files changed

+92390
-1240
lines changed

.gitattributes

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
*.ramres filter=lfs diff=lfs merge=lfs -text
22
*.ramses filter=lfs diff=lfs merge=lfs -text
3+
*.rlogic filter=lfs diff=lfs merge=lfs -text
34
*.png filter=lfs diff=lfs merge=lfs -text
4-
* text=auto
5+
*.blend filter=lfs diff=lfs merge=lfs -text
6+
* text=auto
7+
# The logo is an exception, not checked in over LFS because it doesn't work on RTD
8+
doc/_static/logo.png -filter -diff -merge -text

.readthedocs.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# -------------------------------------------------------------------------
2+
# Copyright (C) 2022 BMW AG
3+
# -------------------------------------------------------------------------
4+
# This Source Code Form is subject to the terms of the Mozilla Public
5+
# License, v. 2.0. If a copy of the MPL was not distributed with this
6+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
# -------------------------------------------------------------------------
8+
9+
# .readthedocs.yml
10+
# Read the Docs configuration file
11+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
12+
13+
---
14+
version: 2
15+
16+
sphinx:
17+
configuration: doc/conf.py
18+
fail_on_warning: true
19+
20+
python:
21+
version: 3.7
22+
install:
23+
- requirements: doc/requirements.txt
24+
...

CHANGELOG.md

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

27+
## [1.9.0] Stencil & Scissor support, Linkable instance count, Texture optimization, Misc Bugfixes
28+
* **File version number has changed. Files saved with RaCo 1.9.0 cannot be opened by previous versions.**
29+
30+
### Known Issues
31+
* Setting a MeshNode `instanceCount` property to a negative value via a link will lead to a runtime crash in Ramses.
32+
33+
### Added
34+
* Added support for stencil testing via new stencil-related properties in the `Material` and `MeshNode` options.
35+
* Added support for scissor testing via new properties in the options container of the `Material` and `MeshNode` types.
36+
* Added color write mask suport in the `Material` and `MeshNode` options.
37+
38+
### Changes
39+
* Added support for direct list/tuple assignment to properties of vector type in Python API.
40+
* Available at feature level 5: made the `instanceCount` property of `MeshNodes` linkable.
41+
* Optimize the texture format in Ramses for normal `Texture` objects. No duplicate color channels or channels with constant values are created anymore. This removes warnings about creating empty channels.
42+
* Do not display warnings for unlinked interfaces in Export dialog
43+
44+
### Fixes
45+
* Don't allow to create links between Vec2f/etc properties and struct properties with the same child properties since they can't be created in the LogicEngine.
46+
* Fixed the potential loss of struct uniform values in `MeshNodes` when loading a file created with RamsesComposer V1.7.0 or earlier with V1.8.0.
47+
* Fix preview scaling to make the scale equal to the device pixel over scene size ratio where the scene size is given by the `Display Size` property in the `ProjectSettings` object.
48+
49+
2750
## [1.8.0] Free Tagging System, Lua Logging, Linkable Struct Uniforms, Misc Bugfixes
2851
* **File version number has changed. Files saved with RaCo 1.8.0 cannot be opened by previous versions.**
2952

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
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 1.8.0)
14+
project(RaCoOS VERSION 1.9.0)
1515

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

@@ -396,4 +396,5 @@ add_subdirectory(EditorApp)
396396
add_subdirectory(resources)
397397

398398
add_subdirectory(PyAPITests)
399-
add_subdirectory(screenshot_tests)
399+
add_subdirectory(screenshot_tests)
400+
add_subdirectory(doc)

PyAPITests/pyt_general.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,67 @@ def test_prop_set_top_fail(self):
440440
with self.assertRaises(RuntimeError):
441441
node.visibility = True
442442

443+
def test_vec_prop_set(self):
444+
lua = raco.create("LuaScript", "lua")
445+
lua.uri = self.cwd() + R"/../resources/scripts/types-scalar.lua"
446+
447+
# Vector assignment from list
448+
lua.inputs.vector2i = [1, 2]
449+
self.assertEqual(lua.inputs.vector2i.i1.value(), 1)
450+
451+
lua.inputs.vector2f = [1.5, 2]
452+
lua.inputs.vector3i = [1, 2, 3]
453+
lua.inputs.vector3f = [1.5, 2, 3]
454+
lua.inputs.vector4i = [1, 2, 3, 4]
455+
lua.inputs.vector4f = [1.5, 2, 3, 4]
456+
self.assertEqual(lua.inputs.vector4f.w.value(), 4)
457+
458+
# Vector assignment from tuple
459+
lua.inputs.vector2f = (3.5, 4)
460+
self.assertEqual(lua.inputs.vector2f.x.value(), 3.5)
461+
462+
# Vector dimension must match list length
463+
with self.assertRaises(RuntimeError):
464+
lua.inputs.vector2f = (1, 2, 3)
465+
466+
def test_array_prop_set_from_list_fail(self):
467+
lua = raco.create("LuaScript", "lua")
468+
lua.uri = self.cwd() + R"/../resources/scripts/array.lua"
469+
470+
# Array of size 5 exists
471+
self.assertEqual(len(lua.inputs.float_array.keys()), 5)
472+
473+
# Array assignment is not supported
474+
with self.assertRaises(RuntimeError):
475+
lua.inputs.float_array = [1, 2, 3, 4, 5]
476+
477+
def test_struct_prop_set_from_list_fail(self):
478+
lua = raco.create("LuaScript", "lua")
479+
lua.uri = self.cwd() + R"/../resources/scripts/struct.lua"
480+
481+
# Struct with 2 elements exists
482+
self.assertEqual(len(lua.inputs.struct.keys()), 2)
483+
484+
# Struct assignment is not supported
485+
with self.assertRaises(RuntimeError):
486+
lua.inputs.struct = [1, 2]
487+
488+
def test_vec_prop_set_from_non_iterable_fail(self):
489+
lua = raco.create("LuaScript", "lua")
490+
lua.uri = self.cwd() + R"/../resources/scripts/types-scalar.lua"
491+
492+
# Assigning non-iterable results in error
493+
with self.assertRaises(TypeError):
494+
lua.inputs.vector2i = 1
495+
496+
def test_vec_prop_set_from_wrong_type_fail(self):
497+
lua = raco.create("LuaScript", "lua")
498+
lua.uri = self.cwd() + R"/../resources/scripts/types-scalar.lua"
499+
500+
# Assigning non-iterable results in error
501+
with self.assertRaises(RuntimeError):
502+
lua.inputs.vector2i = [1, "abc"]
503+
443504
def test_set_int_enum_fail(self):
444505
material = raco.create("Material", "my_mat")
445506

components/libApplication/src/RaCoProject.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,12 @@ RaCoProject::RaCoProject(const QString& file, Project& p, EngineInterface* engin
9494
// Since link duplicates may differ in link validity we need to initialize the link validity from scratch.
9595
if (project_.checkLinkDuplicates()) {
9696
project_.deduplicateLinks();
97-
context_->initLinkValidity();
9897
}
98+
// Needed because
99+
// - link duplicates may have different link validity
100+
// - we used to allow links between logicengine primitive Vec2f/... and structs with the same content properties
101+
// although they can't be linked in the logicengine.
102+
context_->initLinkValidity();
99103

100104
// Create creation records for all PrefabInstances to force update of their children:
101105
// This is necessary since we don't save all the children of the PrefabInstances anymore.

components/libApplication/tests/RaCoApplication_test.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
88
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
99
*/
10-
#include "testing/TestEnvironmentCore.h"
10+
#include "testing/RaCoApplicationTest.h"
1111

1212
#include "core/PathManager.h"
1313
#include "core/Queries.h"
@@ -26,11 +26,7 @@
2626
using raco::application::RaCoApplication;
2727
using raco::components::Naming;
2828

29-
class RaCoApplicationFixture : public RacoBaseTest<> {
30-
public:
31-
raco::ramses_base::HeadlessEngineBackend backend{raco::ramses_base::BaseEngineBackend::maxFeatureLevel};
32-
RaCoApplication application{backend};
33-
};
29+
class RaCoApplicationFixture : public RaCoApplicationTest {};
3430

3531
TEST_F(RaCoApplicationFixture, feature_level_load_keep_file_featue_level) {
3632
application.switchActiveRaCoProject({}, {}, true, 1);
@@ -134,7 +130,7 @@ TEST_F(RaCoApplicationFixture, export_interface_link_opt_4) {
134130
application.switchActiveRaCoProject(QString::fromStdString((test_path() / "export-interface-link-opt-4.rca").string()), {});
135131

136132
std::string error;
137-
EXPECT_FALSE(application.exportProject((test_path() / "export-interface-link-opt-4.ramses").string(), (test_path() / "export-interface-link-opt-4.rlogic").string(), false, error, false));
133+
EXPECT_TRUE(application.exportProject((test_path() / "export-interface-link-opt-4.ramses").string(), (test_path() / "export-interface-link-opt-4.rlogic").string(), false, error, false));
138134
}
139135

140136
TEST_F(RaCoApplicationFixture, export_with_lua_save_mode_for_feature_level_1) {
@@ -636,7 +632,7 @@ TEST_F(RaCoApplicationFixture, importglTFScenegraphWrongFileReturnsEmptyScenegra
636632

637633
auto absPath = test_path().append("nonexistentFile.gltf").string();
638634

639-
auto dummyCacheEntry = commandInterface->meshCache()->registerFileChangedHandler(absPath, {nullptr, nullptr, []() {}});
635+
auto dummyCacheEntry = commandInterface->meshCache()->registerFileChangedHandler(absPath, {nullptr, nullptr});
640636
auto scenegraph = commandInterface->meshCache()->getMeshScenegraph(absPath);
641637

642638
ASSERT_EQ(scenegraph, nullptr);
@@ -647,7 +643,7 @@ TEST_F(RaCoApplicationFixture, importglTFScenegraphWrongFileReturnsEmptyAnimSamp
647643
commandInterface->deleteObjects(application.activeRaCoProject().project()->instances());
648644

649645
auto absPath = test_path().append("nonexistentFile.gltf").string();
650-
auto dummyCacheEntry = commandInterface->meshCache()->registerFileChangedHandler(absPath, {nullptr, nullptr, []() {}});
646+
auto dummyCacheEntry = commandInterface->meshCache()->registerFileChangedHandler(absPath, {nullptr, nullptr});
651647
auto animSampler = commandInterface->meshCache()->getAnimationSamplerData(absPath, 0, 0);
652648

653649
ASSERT_EQ(animSampler, nullptr);

0 commit comments

Comments
 (0)