Skip to content

Commit f9d6b54

Browse files
author
Benjamin Délèze
authored
Fix mesh double loading (#6034)
* Fix mesh double loading * restore * better fix * better fix * restore downloader * changelog
1 parent 55532ce commit f9d6b54

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/reference/changelog-r2023.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Released on ??
1212
- Improved default selected tab in Field Editor when nodes are selected ([#5726](https://github.com/cyberbotics/webots/pull/5726)).
1313
- Change the Windows version of SUMO to 1.13 to match the one used on Linux and MacOS and avoid a potiental Log4J vulnerability ([#6010](https://github.com/cyberbotics/webots/pull/6010)).
1414
- Bug Fixes
15-
- Fixed the clean-up of the motion API which was firing warnings in Python ([#6029](https://github.com/cyberbotics/webots/pull/6029)).
15+
- Fixed the clean-up of the motion API which was firing warnings in Python ([#6029](https://github.com/cyberbotics/webots/pull/6029)).
1616
- Fixed the behavior of the [Connector](connector.md) after a reset to return to the controller the correct status ([#5889](https://github.com/cyberbotics/webots/pull/5889))
1717
- Fixed redirection of stdout/stderr for Python controllers on Windows ([#5807](https://github.com/cyberbotics/webots/pull/5807)).
1818
- Fixed crash in Python API when a robot controller was using several cameras with different resolutions ([#5705](https://github.com/cyberbotics/webots/pull/5705)).
@@ -52,6 +52,7 @@ Released on ??
5252
- Fixed physics state updates of [Solid](solid.md) nodes added to a descendant [`Joint.endPoint`](joint.md) during simulation ([#5961](https://github.com/cyberbotics/webots/pull/5961)).
5353
- Fixed unwanted altitude change when reaching a target waypoint in `mavic2pro_patrol.c` ([#5981](https://github.com/cyberbotics/webots/pull/5981)).
5454
- Fixed the extern controller connection to a target Webots instance when a snap one is running ([#6002](https://github.com/cyberbotics/webots/pull/6002)).
55+
- Fixed the double downloading of meshes ([#6034](https://github.com/cyberbotics/webots/pull/6034)).
5556

5657
## Webots R2023a
5758
Released on November 29th, 2022.

src/webots/nodes/WbMesh.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ void WbMesh::updateUrl() {
336336
mDownloader = NULL;
337337
}
338338

339-
downloadAssets(); // URL was changed from the scene tree or supervisor
339+
if (!mDownloader || mDownloader->url().toString() != mUrl->item(0))
340+
downloadAssets(); // URL was changed from the scene tree or supervisor
341+
340342
return;
341343
}
342344
}

0 commit comments

Comments
 (0)