Tue Nov 22, 2016 4:50 pm
delilush wrote:Hi Everyone,
A few updates:
*Confidential section removed*
'Connection Refactor' release:
Our WME dev team has lately been working on a significant upgrade to improve our ability to develop different features that rely on turn data. This upgrade will be rolled out in the coming beta. It is not visible in the interface but may have different implications that we want you to be aware of:
Once the beta is released, we will ask you to pay extra attention to edits involving segments' splits, merge, turns, disconnection of segments and TBRs. We've run an internal sanity check and don't expect any special issue. However, if you see any weird behaviour - please let us know. (I will repeat this in the beta release post as well).
I understand that this issue is extremely frustrating and wanted to say a few words about it. Some are general comments, and some specific info that will hopefully make the solution for broken scripts easier.
Generally, as you probably know, it is very complicated to support scripts written externally.
The WME code was not designed as a public API. Although we don't obfuscate the code, we cannot commit that ongoing work on different features will not damage externally written scripts.
However, although we don't currently have the dev resources required to open an API and maintain it, we definitely want to find a way to help our script writers in preserving important scripts.
Here are a few solutions we came up with, together with our devs:
- The beta is a great opportunity for the community to detect issues with scripts and report them before they go to production. We will work with the dev team and do our best to fix the problem before releasing a version to a wide base of editors.
However, I do want to highlight that it is important that you check your scripts and report issues as part of the beta testing. After the beta release, if you notice that scripts are broken send us the details of where the error occurs.
- If the devs are aware of a potential "script breaker" for an upcoming beta version, we will let you know about those changes together with the release. That being said, not in every case can we predict where scripts might break.
As tomorrow's beta includes the Connection Refactor, a major code change, we expect scripts to be affected. Here is some info that can be helpful for script writers to adapt their scripts. (if you don't write code, you can stop reading here ):
- connections are no longer stored on segments (fwdConnections and revConnections attributes do not longer exist on the segment object).
- Turn TBRs are also no longer stored on the segments (fwdRestrictions and revRestrictions attributes do not longer exist on the segment object)
- All connection data (turns, TBRs and instruction override) is now stored in a new object called TurnGraph, which can be accessed by calling
- For example: To get the turn from segment 1 (forward direction) to segment 2 (reverse direction) you need to call the following.
The Vertex object can be accessed using require("Waze/Model/Graph/Vertex")
Please let us know if you have any questions.