Skip to content
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

Add debug widget into 3D view #59483

Merged
merged 9 commits into from
Nov 21, 2024
Merged

Conversation

Withalion
Copy link
Contributor

Description

The new debug side panel moves all relevant debug settings into one place, from multiple into one easily accessible side
panel. Furthermore the change implemented in #58947 was missing any option to toggle this on/off.

Features in this PR:

  • New checkbox for stopping scene updates
  • Options moved from advanced sub-category
  • Camera info moved from navigation side panel and changed the way it's shown (changing values through the new spin boxes in next PR)
  • Debug depth map view default position moved from top right corner into bottom left, so it won't collide with the axis view
  • The size of toolbar icons is responsive to the docked state of window

Standalone window:
Screenshot_20241118_224841

Docked window:
Screenshot_20241118_224929

@github-actions github-actions bot added this to the 3.42.0 milestone Nov 18, 2024
@@ -305,6 +308,19 @@ Qgs3DMapCanvasWidget::Qgs3DMapCanvasWidget( const QString &name, bool isDocked )

onTotalPendingJobsCountChanged();

QAction *toggleDebugPanel = toolBar->addAction(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should make this visible by default. It's not something the average user ever needs, and adding it to the toolbar just contributes to UI clutter. Instead of a toolbar action, how about some hidden key shortcut to toggle the pane?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, but I'd rather have a Show debug panel checkbox in advanced settings page instead of completely hiding it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like the @uclaros approach of having a checkbox + I can add a keyboard shortcut

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved the setting into advanced sub-category of options and added a Ctrl+Shift+d shortcut for the panel

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Withalion

Ctrl+Shift+d

That's already used for opening Data Source Manager. How about F12? That's used for the dev tools panel in the main window, so I think it'd be nice to use that here too. (I realise that if the 3d view is docked then F12 would only work if the 3d view is focused, but that same behavior would also be present with Ctrl+Shift+D due to the conflict with the Data Source Manager shortcut)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay that makes sense. I guess having an overlap in shortcuts is unavoidable, but it's definitely better UX on F12.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nyalldawson after testing the change, F12 on docked windows doesn't work at all. For the previous combination I at least got a window about shortcut ambiguity, but on F12 I don't get anything. It just doesn't work. In stand alone window it works.

Copy link

github-actions bot commented Nov 18, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 673fe8d)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 673fe8d)

@DelazJ
Copy link
Contributor

DelazJ commented Nov 19, 2024

side note: it is quite hard to see checkboxes in the dark mode

@Withalion
Copy link
Contributor Author

Regarding the checkboxes, yes totally agree however that's the theme issue. I'm using the default theme in dark mode, other themes don't have this issue. Of course the issue is in the whole app not just in the debug panel

Currently this bricks the screen render
This commit adds new debug side panel (similar to navigation widget), which moves several existing options from settings/navigation panel here. Camera Info has been moved from navigation panel and from table changed into input elements (preparation for another feature). Show map tile info, Show bounding boxes, Show camera's view/rotation center, Show light sources, Show debug overlay, Debug shadow map, Debug Depth map options have been moved from advanced sub-category of options. New Stop scene updates option has been created.
Debug camera info is always shown
Debug depth map widget's default position is moved to bottom left
corner, so it won't collide with axis widget
Docking icon is moved to the last position
Toolbar icon size is finally correct, changes with the window docked state as
it should
Debug panel in 3d map view can be set in advanced settings or by
keyboard shortcut CTRL + SHIFT + d
@wonder-sk wonder-sk added the 3D Relates to QGIS' 3D engine or rendering label Nov 19, 2024
Copy link
Member

@wonder-sk wonder-sk left a comment

Choose a reason for hiding this comment

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

Looking good - finally we're on the way to proper developer tools for 3D scenes 🙂

src/3d/qgs3dmapsettings.cpp Show resolved Hide resolved
src/3d/qgs3dmapsettings.cpp Show resolved Hide resolved
src/3d/qgs3dmapsettings.h Show resolved Hide resolved
src/3d/qgs3dmapsettings.h Outdated Show resolved Hide resolved
src/app/3d/qgs3ddebugwidget.cpp Outdated Show resolved Hide resolved
src/app/3d/qgs3ddebugwidget.cpp Outdated Show resolved Hide resolved
src/app/3d/qgs3ddebugwidget.h Show resolved Hide resolved
src/app/3d/qgs3dmapcanvaswidget.cpp Outdated Show resolved Hide resolved
src/app/3d/qgs3ddebugwidget.cpp Outdated Show resolved Hide resolved
@wonder-sk wonder-sk merged commit 0a1f1cc into qgis:master Nov 21, 2024
30 checks passed
@DelazJ DelazJ added Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Nov 21, 2024
@qgis-bot
Copy link
Collaborator

@Withalion
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@qgis-bot
Copy link
Collaborator

@Withalion

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

@qgis-bot
Copy link
Collaborator

@Withalion
A documentation ticket has been opened at qgis/QGIS-Documentation#9398
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D Relates to QGIS' 3D engine or rendering Changelog Items that are queued to appear in the visual changelog - remove after harvesting Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants