Skip to content

WebotsJS: Fix mf restrictions#5977

Merged
BenjaminDeleze merged 4 commits intodevelopfrom
fix-mf-restrictions
Mar 9, 2023
Merged

WebotsJS: Fix mf restrictions#5977
BenjaminDeleze merged 4 commits intodevelopfrom
fix-mf-restrictions

Conversation

@BenjaminDeleze
Copy link
Copy Markdown

@BenjaminDeleze BenjaminDeleze commented Mar 9, 2023

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

  • Parsing of the proto

@ad-daniel for the NodeSelectorWindow I have in mind to just add a check in fetchCompatibleNodes of NodeSelectorWindow.js, do you think it is a good idea to proceed like that?

@BenjaminDeleze BenjaminDeleze added the bug Something isn't working label Mar 9, 2023
@BenjaminDeleze BenjaminDeleze added this to the R2023b milestone Mar 9, 2023
@BenjaminDeleze BenjaminDeleze self-assigned this Mar 9, 2023
@ad-daniel
Copy link
Copy Markdown
Contributor

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

@BenjaminDeleze
Copy link
Copy Markdown
Author

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.

@ad-daniel
Copy link
Copy Markdown
Contributor

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

@BenjaminDeleze BenjaminDeleze marked this pull request as ready for review March 9, 2023 08:24
@BenjaminDeleze BenjaminDeleze requested a review from a team as a code owner March 9, 2023 08:24
@BenjaminDeleze
Copy link
Copy Markdown
Author

BenjaminDeleze commented Mar 9, 2023

Aaah my bad. It works well, it is just that the RoadLine.proto was not yet added to the database.
But, the parsing still need the patch

@omichel omichel requested a review from ad-daniel March 9, 2023 08:26
Copy link
Copy Markdown
Contributor

@ad-daniel ad-daniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, just a possible improvement

Comment thread resources/web/wwi/protoVisualizer/Parameter.js Outdated
@BenjaminDeleze BenjaminDeleze requested a review from ad-daniel March 9, 2023 08:56
ad-daniel
ad-daniel previously approved these changes Mar 9, 2023
Copy link
Copy Markdown
Contributor

@ad-daniel ad-daniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@BenjaminDeleze BenjaminDeleze merged commit 4bf056e into develop Mar 9, 2023
@BenjaminDeleze BenjaminDeleze deleted the fix-mf-restrictions branch March 9, 2023 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

2 participants