Skip to content

Commit

Permalink
Release v0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AchimStremplat committed Jan 30, 2022
1 parent bf8ffc5 commit fd8cb9d
Show file tree
Hide file tree
Showing 213 changed files with 12,614 additions and 3,888 deletions.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,47 @@ If a copy of the MPL was not distributed with this file, You can obtain one at h
### Known Issues
-->

## [0.12.0] Bug Fixes and Usability Improvements
* **File version number has changed. Files saved with RaCo 0.12.0 cannot be opened by previous versions.**

### Added
* Whenever a private Material is created, it will now always be created with the same Options as the shared Material.
* New collapsable list entry "External References" serves to group all external references together in the resources and prefab views.
* Added command line argument "--loglevel" to headless Ramses Composer for adjusting log verbosity.
* Added color picker for vector properties in the property browser.
* In the scene graph, prefab, project browser and property browser views, shift click on the arrow symbols will now recursively expand or collapse items.
* A new filtering options menu for the ramses preview widget now allows changing from nearest neighbor sampling to linear sampling.
* Added a ramses-logic-viewer build to RaCo binary folder.
* It is now possible to do simple calculations (like "1920/1080" as aspect ratio) directly in the number inputs of the property browser.
* Currently allowed operations: addition (+), substraction (-), multiplication (*), division (/), integer division (//), modulo (%), exponentiation (^) and changing precedence using parentheses.
* Results are calculated immediately and the mathematical expression is not stored.

### Changes
* Update from ramses-logic 0.13.0 to ramses-logic 0.14.2
* Update from ramses 27.0.114 to 27.0.115
* The default resource directories can now be set in the per-project in the project settings instead of the Ramses Composer preferences.
* The button to open the underlying file for LuaScripts and other objects is now enabled in cases where the object itself cannot be edited (due to being an ExtRef or part of a PrefabInstance).
* Log file size is now limited to 10 MB, with new log files being created once this is exceeded. A maximum of 250 MB of log files can be created before old files get deleted.
* Opening the link editor no longer has the search field pre-filled with the name of the current link, if one exists.
* More details for LuaScriptModule errors in LuaScripts - invalid LuaScriptModule assignments are now also shown as individual errors.
* Removed "Debug">"Add dummy scene" menu element.
* Config and log files moved from program folder to user folder (e.g. %APPDATA%/RamsesComposer on Windows).
* Log file for headless Ramses Composer is now named "RaCoHeadless.log".
* The values of new lua input properties for LuaScripts which are direct children of PrefabInstances are now propagated from the corresponding Prefab LuaScript during external reference updates making it possible to set default values in the external project.
* Optimize simultaneous deletion of many links in scenes with many objects.
* Object IDs of the PrefabInstance children objects are now deterministically determined from the corresponding Prefab child and the PrefabInstance itself.

### Fixes
* The application now handles scenarios where saving configfiles is not possible more gracefully.
* Fixed problems loading projects from paths that contain non-latin characters.
* For empty LuaScript files the correct error message is now shown.
* Fixed Ramses API errors appearing in the log window during new project creation.
* Properties "Flip Vertically" and "Generate Mipmaps" in a texture are now updating the Ramses texture immediately.
* The ramses preview toolbar can no longer be hidden with right click, since this was an unintended feature.
* Removed non-functional "?"-Button from all dialog windows.
* Fixed MeshNodes in PrefabInstances having a different private Material uniform order than their Prefab counterparts after changing Material reference.
* Fixed RaCoHeadless not exporting links.

## [0.11.1] Interim Release - The Tangent Fix

### Added
Expand Down
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.19)

SET(CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo")

project(RaCoOS VERSION 0.11.1)
project(RaCoOS VERSION 0.12.0)

SET(RACO_RELEASE_DIRECTORY ${CMAKE_BINARY_DIR}/release)

Expand All @@ -23,7 +23,11 @@ if(NOT RACO_QT_BASE)
# is shared with other products, so please don't randomly change that.
set(QT_ROOT $ENV{QTBASEDIR})
if(NOT QT_ROOT)
set(QT_ROOT "C:/Qt")
if(MSVC_IDE)
set(QT_ROOT "C:/Qt")
else()
set(QT_ROOT "/usr/local/opt/Qt")
endif()
message("Set QT_ROOT to ${QT_ROOT} from value hardcoded into CMakeLists.txt.")
else()
message("Set QT_ROOT to ${QT_ROOT} from QTBASEDIR environment variable.")
Expand Down Expand Up @@ -154,6 +158,9 @@ macro(deploy_gui_shared_dlls tgt)
deploy_headless_shared_dlls(${tgt})
deploy_dlls_and_strip_symbols(${tgt} qtadvanceddocking)
endmacro()
macro(deploy_viewer tgt)
deploy_dlls_and_strip_symbols(${tgt} ramses-logic-viewer)
endmacro()

if(PACKAGE_TESTS)
enable_testing()
Expand Down Expand Up @@ -272,7 +279,6 @@ set_target_properties (RaCoPrepareReleaseFolder PROPERTIES FOLDER Packaging)

# Create default directories for configuration files and project files.
add_custom_command(TARGET RaCoPrepareReleaseFolder POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${RACO_RELEASE_DIRECTORY}/configfiles"
COMMAND ${CMAKE_COMMAND} -E make_directory "${RACO_RELEASE_DIRECTORY}/projects"
)

Expand Down
1 change: 1 addition & 0 deletions EditorApp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ deploy_gui_shared_dlls(RaCoEditor)
deploy_ramses_with_renderer_shared_dlls(RaCoEditor)
deploy_qt(RaCoEditor)
deploy_raco_cppruntime_dlls(RaCoEditor)
deploy_viewer(RaCoEditor)
35 changes: 1 addition & 34 deletions EditorApp/DebugActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,47 +27,14 @@

QMetaObject::Connection openLogFileConnection;
QMetaObject::Connection actionDumpObjectTree;
QMetaObject::Connection actionCreateDummyScene;

void configureDebugActions(Ui::MainWindow* ui, QWidget* widget, raco::core::CommandInterface* commandInterface) {
using raco::components::Naming;
using namespace raco::user_types;

// Debug actions
if (openLogFileConnection) QObject::disconnect(openLogFileConnection);
openLogFileConnection = QObject::connect(ui->actionOpenLogFile, &QAction::triggered, []() { QDesktopServices::openUrl(QUrl{raco::core::PathManager::logFilePath().c_str(), QUrl::TolerantMode}); });
openLogFileConnection = QObject::connect(ui->actionOpenLogFileDirectory, &QAction::triggered, []() { QDesktopServices::openUrl(QUrl::fromLocalFile(raco::core::PathManager::logFileDirectory().string().c_str())); });
if (actionDumpObjectTree) QObject::disconnect(actionDumpObjectTree);
actionDumpObjectTree = QObject::connect(ui->actionDumpObjectTree, &QAction::triggered, [widget]() { raco::debug::dumpLayoutInfo(widget); });
if (actionCreateDummyScene) QObject::disconnect(actionCreateDummyScene);
actionCreateDummyScene = QObject::connect(ui->actionCreateDummyScene, &QAction::triggered, [commandInterface]() {
const auto& prefs = raco::components::RaCoPreferences::instance();

auto mesh = commandInterface->createObject(raco::user_types::Mesh::typeDescription.typeName, Naming::format("DuckMesh"));
commandInterface->set(raco::core::ValueHandle{mesh, &Mesh::bakeMeshes_}, true);
commandInterface->set(raco::core::ValueHandle{mesh, &Mesh::uri_},
(raco::core::PathManager::defaultResourceDirectory() / prefs.meshSubdirectory.toStdString() / "Duck.glb").generic_string());
auto material = commandInterface->createObject(raco::user_types::Material::typeDescription.typeName, Naming::format("DuckMaterial"));
commandInterface->set(raco::core::ValueHandle{material, &Material::uriVertex_},
(raco::core::PathManager::defaultResourceDirectory() / prefs.shaderSubdirectory.toStdString() / "simple_texture.vert").generic_string());
commandInterface->set(raco::core::ValueHandle{material, &Material::uriFragment_},
(raco::core::PathManager::defaultResourceDirectory() / prefs.shaderSubdirectory.toStdString() / "simple_texture.frag").generic_string());
auto texture = commandInterface->createObject(raco::user_types::Texture::typeDescription.typeName, Naming::format("DuckTexture"));
commandInterface->set(raco::core::ValueHandle{texture, &Texture::uri_},
(raco::core::PathManager::defaultResourceDirectory() / prefs.imageSubdirectory.toStdString() / "DuckCM.png").generic_string());

auto node = commandInterface->createObject(raco::user_types::Node::typeDescription.typeName, Naming::format("DuckNode"));
auto meshNode = commandInterface->createObject(raco::user_types::MeshNode::typeDescription.typeName, Naming::format("DuckMeshNode"));
commandInterface->moveScenegraphChildren({meshNode}, node);

commandInterface->set(raco::core::ValueHandle{meshNode, &MeshNode::mesh_}, mesh);
commandInterface->set(raco::core::ValueHandle{meshNode, {"materials", "material", "material"}}, material);

commandInterface->set(raco::core::ValueHandle{meshNode, &MeshNode::translation_, &Vec3f::y}, -1.7);
commandInterface->set(raco::core::ValueHandle{meshNode, &MeshNode::rotation_, &Vec3f::y}, -160.0);
commandInterface->set(raco::core::ValueHandle{meshNode, &MeshNode::scale_, &Vec3f::x}, 2.0);
commandInterface->set(raco::core::ValueHandle{meshNode, &MeshNode::scale_, &Vec3f::y}, 2.0);
commandInterface->set(raco::core::ValueHandle{meshNode, &MeshNode::scale_, &Vec3f::z}, 2.0);

commandInterface->set(raco::core::ValueHandle{material, {"uniforms", "u_Tex"}}, texture);
});
}
16 changes: 11 additions & 5 deletions EditorApp/OpenRecentMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include "OpenRecentMenu.h"

#include "core/PathManager.h"
#include "utils/PathUtils.h"
#include "log_system/log.h"
#include "utils/u8path.h"
#include <QSettings>

OpenRecentMenu::OpenRecentMenu(QWidget* parent) : QMenu{"Open Recent", parent} {
Expand All @@ -21,7 +22,7 @@ OpenRecentMenu::OpenRecentMenu(QWidget* parent) : QMenu{"Open Recent", parent} {

void OpenRecentMenu::addRecentFile(const QString& file) {
if (file.size()) {
QSettings recentFilesStore(raco::core::PathManager::recentFilesStorePath().c_str(), QSettings::IniFormat);
auto recentFilesStore = raco::core::PathManager::recentFilesStoreSettings();
QStringList recentFiles{recentFilesStore.value("recent_files").toStringList()};
auto it = std::find(recentFiles.begin(), recentFiles.end(), file);
if (it != recentFiles.end()) {
Expand All @@ -34,11 +35,16 @@ void OpenRecentMenu::addRecentFile(const QString& file) {
}
recentFilesStore.setValue("recent_files", recentFiles);
refreshRecentFileMenu();

recentFilesStore.sync();
if (recentFilesStore.status() != QSettings::NoError) {
LOG_ERROR(raco::log_system::COMMON, "Saving recent files list failed: {}", raco::core::PathManager::recentFilesStorePath().string());
}
}
}

void OpenRecentMenu::refreshRecentFileMenu() {
QSettings recentFilesStore(raco::core::PathManager::recentFilesStorePath().c_str(), QSettings::IniFormat);
auto recentFilesStore = raco::core::PathManager::recentFilesStoreSettings();
QStringList recentFiles{recentFilesStore.value("recent_files").toStringList()};
setDisabled(recentFiles.size() == 0);
while (actions().size() > 0) {
Expand All @@ -48,10 +54,10 @@ void OpenRecentMenu::refreshRecentFileMenu() {
auto* action = addAction(file);

auto fileString = file.toStdString();
if (!raco::utils::path::exists(fileString)) {
if (!raco::utils::u8path(fileString).exists()) {
action->setEnabled(false);
action->setText(file + " (unavailable)");
} else if (!raco::utils::path::userHasReadAccess(fileString)) {
} else if (!raco::utils::u8path(fileString).userHasReadAccess()) {
action->setEnabled(false);
action->setText(file + " (no read access)");
}
Expand Down
13 changes: 8 additions & 5 deletions EditorApp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "ramses_widgets/RendererBackend.h"
#include "style/RaCoStyle.h"
#include "utils/CrashDump.h"
#include "utils/PathUtils.h"
#include "utils/u8path.h"

#include <QApplication>
#include <QCommandLineParser>
Expand All @@ -44,6 +44,9 @@ int main(int argc, char *argv[]) {
QCoreApplication::setApplicationName("Ramses Composer");
QCoreApplication::setApplicationVersion(RACO_OSS_VERSION);

// QDialogs will show a "?"-Button by default. While it is possible to disable this for every single dialog, we never need this and thus, disabling it globally is easier.
QApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);

QCommandLineParser parser;
parser.addHelpOption();
parser.addVersionOption();
Expand Down Expand Up @@ -92,9 +95,9 @@ int main(int argc, char *argv[]) {
createStdOutConsole();
}

raco::core::PathManager::init(QCoreApplication::applicationDirPath().toStdString());

raco::log_system::init(raco::core::PathManager::logFilePath().c_str());
auto appDataPath = raco::utils::u8path(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation).toStdString()).parent_path() / "RamsesComposer";
raco::core::PathManager::init(QCoreApplication::applicationDirPath().toStdString(), appDataPath);
raco::log_system::init(raco::core::PathManager::logFileEditorName().internalPath().native());

const QStringList args = parser.positionalArguments();

Expand All @@ -111,7 +114,7 @@ int main(int argc, char *argv[]) {
if (projectFileCandidate) {
if (projectFileCandidate->suffix().compare(raco::names::PROJECT_FILE_EXTENSION, Qt::CaseInsensitive) == 0) {
if (projectFileCandidate->exists()) {
if (raco::utils::path::userHasReadAccess(projectFileCandidate->filePath().toStdString())) {
if (raco::utils::u8path(projectFileCandidate->filePath().toStdString()).userHasReadAccess()) {
projectFile = projectFileCandidate->absoluteFilePath();
LOG_INFO(raco::log_system::COMMON, "starting Ramses Composer with project file {}", projectFile.toStdString());
} else {
Expand Down
Loading

0 comments on commit fd8cb9d

Please sign in to comment.