WebotsJS: Fix mf restrictions#5977
Conversation
|
Uhm, restrictions for MFNode was implemented already, unless it broke at some point. Essentially MFNode restrictions are imposed like SFNode restrictions, meaning it's just about only showing the allowed nodes in the NodeSelectorWindow. Basically this check should exclude everything except the allowed ones |
True, I will check why it failed. |
|
I can check as well if needed, I'm pretty sure it worked at some point. I've used the Road PROTO to develop it after all. Let me know |
|
Aaah my bad. It works well, it is just that the |
ad-daniel
left a comment
There was a problem hiding this comment.
Works well, just a possible improvement
This reverts commit 06046c4.
Description
Implement the restriction mechanism for MFNode as it is needed for the Road protos.
Test it here: https://testing.webots.cloud/run?version=R2023b&url=https://github.com/cyberbotics/webots/blob/doc-add-objects/projects/objects/road/protos/AddLaneRoadSegment.proto&type=undefined
@ad-daniel for the NodeSelectorWindow I have in mind to just add a check in
fetchCompatibleNodesofNodeSelectorWindow.js, do you think it is a good idea to proceed like that?