Closed bdog2112 closed 1 year ago
One-click Road Network Setup Tests:
RoadPoint Edit Panel Tests:
Lane Widget Tests:
The above tests are, by no means, exhaustive. Many other things could be checked including: Adding/Removing Lanes via panel and widget, Adjusting Mag Handles, RoadPoint naming conventions and so on... But, hey, it's a start. :-)
FYI also for context, so you are aware where these issues are being tracked:
... or just search recent issues, I've created a bunch (a mix of bugs and feature improvements). In all cases, the crux is merging this branch first so let's see if we can get to it!
Also will be good to get in a habit of running the tests whenever we make changes, all looking good right now thought:
Warnings/Errors:
* 2 Warnings.
4 passed 0 failed. Tests finished in 0.0s
[Orphans]: 68 new orphans in total.
Note: This count does not include GUT objects that will be freed upon exit.
It also does not include any orphans created by global scripts
loaded before tests were ran.
Total orphans = 70
FYI @bdog2112 would be good to prioritize anything remaining in this PR, so we can merge it and I can launch 0.3.0 (the alpha will launch with 0.3.1)
All tests pass. Merging 3...2...1...
Hey Patrick,
Please checkout this WIP for one-click road setups. Also, please let me know if you have any additional requirements not explicitly captured in Issue #55.
As a first step, I recommend trying 2 things:
You should observe a new Segment being created at the World Origin in both cases. Also, "points" and "segments" nodes are automatically added to RoadNetworks if they don't already exist and a road material is also assigned.
If the user deletes "points" and/or "segments", they will be re-created when "Create>2x2 road" is clicked.
We may want to remove "points" and "segments" from the export variables since users probably shouldn't be messing with them.
Also, currently, nothing happens if a RoadPoint is selected and the user clicks "Create>2x2 road". Please let me know if you have additional requirements in this area.
In other news, the approach to Lane Widget hiding had to be updated in conjunction with showing/hiding the new "Create" menu in the 3D viewport. This eliminated the need to find the "points" node in plugin.gd._on_selection_changed.
Following this post, I will post a series of test cases that I am using for testing. You're welcome to follow along if you wish.