Skip to content

Commit

Permalink
Release v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
webermm committed Aug 18, 2022
1 parent 6f21455 commit 2fb2ce7
Show file tree
Hide file tree
Showing 562 changed files with 42,312 additions and 1,009 deletions.
35 changes: 32 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SPDX-License-Identifier: MPL-2.0
This file is part of Ramses Composer
(see https://github.com/GENIVI/ramses-composer).
(see https://github.com/bmwcarit/ramses-composer).
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand All @@ -24,6 +24,34 @@ If a copy of the MPL was not distributed with this file, You can obtain one at h
-->

## [1.2.0] Trace player, weak links, and running Python script in GUI application
* **File version number has changed. Files saved with RaCo 1.1.2 cannot be opened by previous versions.**

### Added
* Added ability to run Python scripts in the UI version.
* Use the new command line argument "-r" to run Python scripts before the UI appears.
* During UI usage, you can run Python scripts using the new dialog "File" -> "Run Script..."
* Note that Python functions "load()" and "reset()" have been temporarily disabled for this particular use case as they are currently incompatible with scene switches in the UI.
* Added TracePlayer
* TracePlayer is used for simulation and debugging purposes, where a recorded, or manually defined, animation scenario in a RaCo trace file (.rctrace) can be loaded and played in the scene.
* rctrace files are JSON based files that should contain so called frames of scene properties data in consecutive timestamps snapshots.
* TracePlayer parses frames periodically based on RaCo application update time and updates the corresponding LuaScript or LuaInterface object(s) in the scene.
* For more details with an example, see the TracePlayer section in the Ramses Composer documentation.
* Added support for weak links. Weak links are ignored in the LogicEngine Lua dependency graph which determines the Lua execution order.
* Weak links can be created in the UI when a loop would be created with a strong link.
* Strong/weak links are indicated in the property browser by double/single left arrows next to the link menu button.
* The Python API addLink received an additional argument to allow creating weak links.
* Added "all file" filter for file dialogs that load files (e.g. URIs).

### Changes
* Changed "ramses-framework-arguments" ("-r") command line argument to "framework-arguments" ("-a").
* Icons in read-only state (e.g. link icons of properties in the Property Browser) will retain their color now.
* Removed lua script time_ms hack.

### Fixes
* Fixed incorrect update of PrefabInstance contents when loading a scene with a camera inside a PrefabInstance referenced by a RenderPass.


## [1.1.2] Lua Interface Naming Bugfix

### Fixes
Expand All @@ -45,6 +73,7 @@ If a copy of the MPL was not distributed with this file, You can obtain one at h
* Fixed Timer objects being deleted all the time by "Delete Unused Resources" despite potential links to and from the Timer.



## [1.1.0] Lua Interfaces, various UI improvements
* **File version number has changed. Files saved with RaCo 1.1.0 cannot be opened by previous versions.**
* **Check the suggested migration procedure below for the LuaInterfaces introduced in RamsesComposer 1.1.0 to avoid unnecessary issues.**
Expand Down Expand Up @@ -411,7 +440,7 @@ If a copy of the MPL was not distributed with this file, You can obtain one at h
* A broken render target now stops a render pass rendering to it from rendering, instead of rendering to the default framebuffer.
* Also: the render pass shows a warning that it won't render due to the broken render target.
* A render target now displays an error if some of its render buffers are either not valid or not set.
* This is due to https://github.com/COVESA/ramses/issues/52
* This is due to https://github.com/bmwcarit/ramses/issues/52
* A render target now displays an error if its first render buffer is not set.
* The sampling parameters are hidden for depth buffers.
* Fixed absolute paths for .ramses & .rlogic files not being recognized in the "Export Project" dialog.
Expand Down Expand Up @@ -533,7 +562,7 @@ If a copy of the MPL was not distributed with this file, You can obtain one at h
### Changes
* Update from ramses-logic 0.6.0 to ramses-logic 0.6.1
* Update from ramses 27.0.102 to ramses 27.0.103
* Removed RACO_CONVENTIONS.md - superseded with the Ramses Composer documentation repository: https://github.com/GENIVI/ramses-composer-docs
* Removed RACO_CONVENTIONS.md - superseded with the Ramses Composer documentation repository: https://github.com/bmwcarit/ramses-composer-docs
* PrefabInstance interface scripts (LuaScripts on PrefabInstance top level) now get exported with the object name "<Prefab Instance name>.<LuaScript name>".
* The folder and library structure has been cleaned up.
* LuaScripts that have no parent are not displayed in the Resource tree anymore.
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SPDX-License-Identifier: MPL-2.0
This file is part of Ramses Composer
(see https://github.com/GENIVI/ramses-composer).
(see https://github.com/bmwcarit/ramses-composer).
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand All @@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.19)

SET(CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo")

project(RaCoOS VERSION 1.1.2)
project(RaCoOS VERSION 1.2.0)

SET(RACO_RELEASE_DIRECTORY ${CMAKE_BINARY_DIR}/release)

Expand Down
6 changes: 5 additions & 1 deletion EditorApp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SPDX-License-Identifier: MPL-2.0
This file is part of Ramses Composer
(see https://github.com/GENIVI/ramses-composer).
(see https://github.com/bmwcarit/ramses-composer).
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down Expand Up @@ -42,6 +42,7 @@ set_target_properties(RaCoEditor PROPERTIES OUTPUT_NAME "RamsesComposer" RUNTIME
add_dependencies(RaCoEditor RaCoResources RaCoPrepareReleaseFolder)

target_link_libraries(RaCoEditor
PUBLIC
raco::LogSystem
raco::PropertyBrowser
raco::CommonWidgets
Expand All @@ -52,6 +53,9 @@ target_link_libraries(RaCoEditor
raco::ObjectTree
Qt5::Widgets
qtadvanceddocking
raco::PythonAPI
PRIVATE
raco::pybind11
)
add_compile_definitions(RaCoEditor PRIVATE CMAKE_SOURCE_DIR="${CMAKE_SOURCE_DIR}")

Expand Down
2 changes: 1 addition & 1 deletion EditorApp/DebugActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
2 changes: 1 addition & 1 deletion EditorApp/DebugActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
2 changes: 1 addition & 1 deletion EditorApp/EditMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
2 changes: 1 addition & 1 deletion EditorApp/EditMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
2 changes: 1 addition & 1 deletion EditorApp/ForceHighEndGPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
2 changes: 1 addition & 1 deletion EditorApp/OpenRecentMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
2 changes: 1 addition & 1 deletion EditorApp/OpenRecentMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
2 changes: 1 addition & 1 deletion EditorApp/RaCoDockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
2 changes: 1 addition & 1 deletion EditorApp/RaCoDockManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
2 changes: 1 addition & 1 deletion EditorApp/SavedLayoutsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
2 changes: 1 addition & 1 deletion EditorApp/SavedLayoutsDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand Down
75 changes: 67 additions & 8 deletions EditorApp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
* SPDX-License-Identifier: MPL-2.0
*
* This file is part of Ramses Composer
* (see https://github.com/GENIVI/ramses-composer).
* (see https://github.com/bmwcarit/ramses-composer).
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

// Needs to be first
#include <raco_pybind11_embed.h>

#include "mainwindow.h"

#include "application/RaCoApplication.h"
Expand All @@ -21,9 +25,13 @@
#include "utils/CrashDump.h"
#include "utils/u8path.h"

#include "python_api/PythonAPI.h"

#include <QApplication>
#include <QCommandLineParser>

namespace py = pybind11;

void createStdOutConsole();

#ifdef _WIN32
Expand Down Expand Up @@ -64,8 +72,8 @@ int main(int argc, char* argv[]) {
<< "console",
"Open with std out console.");
QCommandLineOption forwardCommandLineArgs(
QStringList() << "r"
<< "ramses-framework-arguments",
QStringList() << "a"
<< "framework-arguments",
"Override arguments passed to the ramses framework.",
"default-args");
QCommandLineOption noDumpFileCheckOption(
Expand All @@ -81,11 +89,17 @@ int main(int argc, char* argv[]) {
QStringList() << "t"
<< "trace-messages-ramses",
"Enable trace-level Ramses log messages.");
QCommandLineOption pyrunOption(
QStringList() << "r"
<< "run",
"Run Python script. Specify arguments for python script by writing '--' before arguments.",
"script-path");
parser.addOption(consoleOption);
parser.addOption(forwardCommandLineArgs);
parser.addOption(noDumpFileCheckOption);
parser.addOption(loadProjectAction);
parser.addOption(ramsesTraceLogMessageAction);
parser.addOption(pyrunOption);

// apply global style, must be done before application instance
QApplication::setStyle(new raco::style::RaCoStyle());
Expand All @@ -96,7 +110,26 @@ int main(int argc, char* argv[]) {
// force use of style palette, required on Linux
a.setPalette(a.style()->standardPalette());

parser.process(QCoreApplication::arguments());
auto args = QCoreApplication::arguments();
std::vector<std::string> pythonArguments;

{
auto parsingPythonArgs = false;
auto argsIt = args.begin();
while (argsIt != args.end()) {
if (*argsIt == "--") {
parsingPythonArgs = true;
++argsIt;
} else if (parsingPythonArgs) {
pythonArguments.emplace_back(argsIt->toStdString());
argsIt = args.erase(argsIt);
} else {
++argsIt;
}
}
}

parser.process(args);

bool noDumpFiles = parser.isSet(noDumpFileCheckOption);
raco::utils::crashdump::installCrashDumpHandler(noDumpFiles);
Expand All @@ -109,15 +142,29 @@ int main(int argc, char* argv[]) {
raco::core::PathManager::init(QCoreApplication::applicationDirPath().toStdString(), appDataPath);
raco::log_system::init(raco::core::PathManager::logFileEditorName().internalPath().native());

const QStringList args = parser.positionalArguments();
const QStringList positionalArgs = parser.positionalArguments();

// support both loading with named parameter for compatibility with headless version and
// loading with positional parameter drag&drop onto desktop icon
QString projectFile{};
if (parser.isSet(loadProjectAction)) {
projectFile = QFileInfo(parser.value(loadProjectAction)).absoluteFilePath();
} else if (args.size() > 0) {
projectFile = QFileInfo(args.at(0)).absoluteFilePath();
} else if (positionalArgs.size() > 0) {
projectFile = QFileInfo(positionalArgs.at(0)).absoluteFilePath();
}

QString pythonScriptPath{};
if (parser.isSet(pyrunOption)) {
QFileInfo path(parser.value(pyrunOption));
if (path.exists()) {
if (raco::utils::u8path(path.filePath().toStdString()).userHasReadAccess()) {
pythonScriptPath = path.absoluteFilePath();
} else {
LOG_ERROR(raco::log_system::PYTHON, "Python script file could not be read {}", path.filePath().toStdString());
}
} else {
LOG_ERROR(raco::log_system::PYTHON, "Python script file not found {}", path.filePath().toStdString());
}
}

// set font, must be done after application instance
Expand All @@ -129,7 +176,7 @@ int main(int argc, char* argv[]) {
std::unique_ptr<raco::application::RaCoApplication> app;

try {
app = std::make_unique<raco::application::RaCoApplication>(rendererBackend, raco::application::RaCoApplicationLaunchSettings{projectFile, true, parser.isSet(ramsesTraceLogMessageAction)});
app = std::make_unique<raco::application::RaCoApplication>(rendererBackend, raco::application::RaCoApplicationLaunchSettings{projectFile, true, parser.isSet(ramsesTraceLogMessageAction), true});
} catch (const raco::application::FutureFileVersion& error) {
LOG_ERROR(raco::log_system::COMMON, "File load error: project file was created with newer file version {} but current file version is {}.", error.fileVersion_, raco::serialization::RAMSES_PROJECT_FILE_VERSION);
app.reset();
Expand All @@ -143,6 +190,18 @@ int main(int argc, char* argv[]) {

if (app) {
MainWindow w{app.get(), &rendererBackend};

if (!pythonScriptPath.isEmpty()) {
auto pythonScriptPathStr = pythonScriptPath.toStdString();
std::vector<const char*> pos_argv_cp;
pos_argv_cp.emplace_back(pythonScriptPathStr.c_str());
for (auto& s : pythonArguments) {
pos_argv_cp.emplace_back(s.c_str());
}

raco::python_api::runPythonScript(app.get(), QCoreApplication::applicationFilePath().toStdWString(), pythonScriptPath.toStdString(), pos_argv_cp);
}

w.show();

return a.exec();
Expand Down
Loading

0 comments on commit 2fb2ce7

Please sign in to comment.