-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag and drop mesh into scene #939
Conversation
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo3 #939 +/- ##
===============================================
+ Coverage 77.90% 77.96% +0.05%
===============================================
Files 221 221
Lines 12678 12678
===============================================
+ Hits 9877 9884 +7
+ Misses 2801 2794 -7
Continue to review full report at Codecov.
|
src/gui/plugins/scene3d/Scene3D.cc
Outdated
if (!common::EndsWith(lowerStr, ".dae") | ||
&& !common::EndsWith(lowerStr, ".stl")) | ||
{ | ||
ignwarn << "Only DAE and STL meshes are supported." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should surface this as an actual dialog or warning. From a UX perspective, you would drag and drop into the GUI and then nothing would actually happen. If you didn't think to check the console log, it would be unintuitive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh how I wish we had a proper snackbar gazebosim/gz-gui#44
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How's this? 7717bac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to add an okay button to the dialog? It seems a bit unintuitive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
38893b9 ?
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
signals: void ErrorPopupTextChanged(); | ||
|
||
/// \brief Notify that an error has occurred (opens popup) | ||
signals: void popupError(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
signals: void popupError(); | |
signals: void PopupError(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
popupError()
needs to be formatted as such for the QML connection to work properly: https://github.com/ignitionrobotics/ign-gazebo/blob/0db584abf7efcc97cfc03946ea33d5130e13e410/src/gui/plugins/scene3d/GzScene3D.qml#L105
Similar to openContextMenu
:
https://github.com/ignitionrobotics/ign-gazebo/blob/0db584abf7efcc97cfc03946ea33d5130e13e410/src/gui/plugins/scene3d/Scene3D.hh#L717-L721
I've added the same comment from openContextMenu
to popupError
805bd9b
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Cross-referencing #185. This doesn't exactly match the feature on that issue, but it's close enough that we may consider that closed. |
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me 👍 I just have some nitpicks on the error dialog.
Some ideas for the future, I think it would be nice to give the user these options before the model is spawned:
- A scale for the mesh before inserting
- Whether the model will be static
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for iterating, LGTM
🎉 New feature
Summary
Allows a user to drag and drop an OBJ, DAE, or STL mesh into the scene.
Test it
ign gazebo -v 4
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge