Skip to content

Commit

Permalink
Merge branch 'develop' into merge-master-into-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-daniel authored Dec 17, 2021
2 parents ba91834 + 1b3f238 commit 5143e6a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/blog/Webots-2022-a-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ We worked hard to convert all PROTOs and worlds distributed with Webots for you,
A mechanism of backward compatibility has been implemented directly in Webots.
Unfortunately, it was not possible to make it work in every cases.
It will try to convert worlds and PROTOs at runtime, but PROTO changes cannot be saved.
We also wrote a [guide](https://github.com/cyberbotics/webots/wiki/FLU-and-ENU-conversion-guide) to help you convert your own PROTOs and worlds to use them in Webots R2022a.
We also wrote a [guide](https://github.com/cyberbotics/webots/wiki/How-to-adapt-your-world-or-PROTO-to-Webots-R2022a) to help you convert your own PROTOs and worlds to use them in Webots R2022a.

We are aware that it is a major change and it can be annoying to convert your worlds and PROTOs to the new format.
However, it is a worthwhile effort, especially if you work with ROS.
Expand Down
7 changes: 7 additions & 0 deletions src/webots/engine/WbSimulationWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "WbBoundingSphere.hpp"
#include "WbDownloader.hpp"
#include "WbLog.hpp"
#include "WbMassChecker.hpp"
#include "WbNodeOperations.hpp"
#include "WbNodeUtilities.hpp"
Expand All @@ -34,6 +35,7 @@
#include "WbSimulationState.hpp"
#include "WbSoundEngine.hpp"
#include "WbTemplateManager.hpp"
#include "WbTokenizer.hpp"
#include "WbViewpoint.hpp"
#include "WbWrenRenderingContext.hpp"

Expand Down Expand Up @@ -139,6 +141,11 @@ WbSimulationWorld::WbSimulationWorld(WbProtoList *protos, WbTokenizer *tokenizer
connect(worldInfo(), &WbWorldInfo::optimalThreadCountChanged, this, &WbSimulationWorld::updateNumberOfThreads);
connect(worldInfo(), &WbWorldInfo::randomSeedChanged, this, &WbSimulationWorld::updateRandomSeed);

if (WbTokenizer::worldFileVersion() < WbVersion(2021, 1, 1))
WbLog::info(tr("You are using a world from an old version of Webots. The backwards compability algorithm will try to "
"convert it. Refer to the wiki for more information: "
"https://github.com/cyberbotics/webots/wiki/How-to-adapt-your-world-or-PROTO-to-Webots-R2022a"));

WbNodeUtilities::fixBackwardCompatibility(WbWorld::instance()->root());
}

Expand Down
4 changes: 2 additions & 2 deletions src/webots/gui/WbUpdatedDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ WbUpdatedDialog::WbUpdatedDialog(QWidget *parent) : QDialog(parent) {
"If your previous world or PROTO files include devices, geometries, or Webots PROTOs, "
"then Webots will try to preserve the old behavior by rotating them. However, you may have to rotate some objects, "
"fix bounding objects or adjust your controller by yourself. <br />Refer to the < a style = 'color: #5DADE2;' "
"href='https://github.com/cyberbotics/webots/wiki/"
"FLU-and-ENU-conversion-guide'>wiki</a> for more information. </p>"));
"href='https://github.com/cyberbotics/webots/wiki/How-to-adapt-your-world-or-PROTO-to-Webots-R2022a'>wiki</a> for more "
"information. </p>"));
label->setOpenExternalLinks(true);
label->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignTop);
label->setStyleSheet("border: none");
Expand Down

0 comments on commit 5143e6a

Please sign in to comment.