Commit graph

47 commits

Author SHA1 Message Date
Yann Lanthony
f5607cb127
[ui] downgrade QtQuick import version for retro-compatibility 2019-07-24 18:13:23 +02:00
Yann Lanthony
4563d32e3e
[ui] Viewer2D: add FeaturesViewer + dedicated overlay
Make FeaturesViewer available in Viewer2D to display the feature points of the current view, based on the current FeatureExtraction node.

* FeaturesInfoOverlay: overlay that displays info and provides controls over a FeaturesViewer component.
* ColorChart: color picker based on a set of predefined colors.
2019-07-04 18:25:02 +02:00
Yann Lanthony
8dd0a4be22
[ui] New FeaturesViewer component
FeaturesViewer wraps QtAliceVision plugin's FeaturesViewer component to display the extracted feature points of a View.
2019-07-04 17:51:44 +02:00
Yann Lanthony
b46a2dbba1 [ui] Controls: add SearchBar component + better keyboard focus handling
* use it in MetadataListView and GraphEditor 'add Node' menu
* GraphEditor: forward MenuItem key events to searchBar to be able to continue editing the filter even if it lost active focus
2019-01-07 16:48:17 +01:00
Yann Lanthony
7415c1d391 [ui] split 2D and 3D viewers into separate modules
+ remove historical MayaCameraController
2018-11-23 14:26:57 +01:00
Yann Lanthony
c0c28b5dcf [ui] Viewer3D: minor fixes
* remove unneeded hack to clear the SceneLoader
* don't display sfm checkbox if alembicPlugin is not available
2018-08-03 17:24:04 +02:00
Fabien Castan
44e34d7eb3 [ui] use shift to pan (instead of Ctrl) 2018-08-03 14:38:08 +02:00
Fabien Castan
10026e3281 [ui] mouse: add "Ctrl+Left click" as an alternative to Middle click 2018-07-21 14:54:28 +02:00
Yann Lanthony
2f2390e465 [ui] fix Palette propagation
* bugfix: in latest PySide2 versions, application palette is not properly applied to all QtQuick Controls 2 components. Force this by exposing QApplication palette and bind it to the root ApplicationWindow.
* rename all "palette" ids to "activePalette" to avoid clashes with "palette" property on QtQuick Controls 2
* use parent component palette when it makes sense to propagate active/disabled style (instead of always using Active SystemPalette)
2018-05-28 15:30:09 +02:00
Yann Lanthony
f87024b0c5 [ui] highlight selected view in 3D + 3D picking
Spawn a cube on each camera to display which one is selected + allow picking from the 3D view
2018-04-21 13:14:29 +02:00
Yann Lanthony
cfaa0bc012 [ui] Viewer2D: display image source path
* display selectable-by-mouse source filepath
* add radius property to FloatingPane to control border radius from outside
* use FloatingPane in ImageMetadataView
2018-04-16 12:14:04 +02:00
Yann Lanthony
1e462d94de [ui][3d] fix depthMap clearing
* must be fixed in qtOIIO plugin
2018-04-13 22:46:44 +02:00
Yann Lanthony
b64cfc856c [ui] ImageMetadataView: display image location on map when available 2018-04-13 19:29:30 +02:00
Yann Lanthony
472b860131 [ui] better handling of Reconstruction's current sfm node
* reset sfm node on graph change by using 'sfm' property (ensure previous sfm node is correctly disconnected)
* ui: clear viewers when graph changes
2018-04-06 14:24:45 +02:00
Yann Lanthony
11121039dc [ui] Viewer3D: reset polycount on source change 2018-04-05 22:00:20 +02:00
Yann Lanthony
a2dd3c22bd [ui][3D] tweak rotation/scale pane
* use a GridLayout
* reduce default sliders size
2018-03-23 11:23:47 +01:00
Yann Lanthony
35e89a3c9b [ui][3D] retrieve and display polycount after loading a scene
* use vertexPosition attribute buffer to determine the number of faces
* remove useless Qt.resolvedUrl()
2018-03-23 11:23:46 +01:00
Yann Lanthony
d4c0a4975a [ui] add "Controls" module to centralize common UI components
* add FloatingPane control + use it in Viewer3D
2018-03-23 11:17:11 +01:00
Yann Lanthony
74e80e70b5 [ui][3d] introduce Wireframe render mode
* add WireframeMaterial from Qt 3D example
* MaterialSwitcher now has 3 render modes: Solid, Wireframe, Textured
* Remove NodeInstantiator; always create the material and modify entity's components (avoid rendering issues when switching between materials)
* use DiffuseSpecularMaterial for Solid and Textured mode
* create a MaterialSwitcher for all types of meshes (with/without textures)
* add a render settings panel as part of 3D viewport overlay and remove "Textures" entry from outliner
2018-03-23 11:17:10 +01:00
Yann Lanthony
f1d4291219 [ui][3d] improve layout of mesh rotation/scale control 2018-03-21 17:24:19 +01:00
Yann Lanthony
9f39579e00 [ui][3d] reduce camera nearPlane
useful for close-up mesh inspection
2018-03-21 17:24:19 +01:00
Yann Lanthony
266f0985d2 [ui] convert string paths to urls outside Viewers
* fix external image drop on 2D Viewer
* fix 3D model loading from "Load Model" button
2018-03-21 15:53:34 +01:00
Yann Lanthony
f1b42acc14 [ui] add FilepathHelper Python class to manipulate paths and QUrls
* avoid non-cross platform hacks to convert string path to urls
* use standard python API
2018-03-06 15:32:33 +01:00
Yann Lanthony
2cdc83f06f [ui] add string <--> file representation convertors
* convenient methods to conform strings to Qt file reprensentation using the "file:/" protocol prefix
* use those methodes when manipulating files
2018-02-26 16:59:25 +01:00
Yann Lanthony
9501307256 [ui] MetadataView: move model delegate declatation in the ListView 2018-02-16 13:03:56 +01:00
Yann Lanthony
d2da971169 [ui] improve SortFilterDelegateModel
* use variant for filterValue and implement different logics to test filter matching based on value type
* allow redefinition of modelData and respectFilter functions to customize logic from outisde if need be
* add convenient 'reverseSortOrder' method
2018-02-16 13:02:18 +01:00
Yann Lanthony
53764812bd [ui] add ImageMetadataView + integration in Viewer2D
* display image metadata as a sorted table view with filtering  
* 2DViewer: new bottom toolbar with metadata toggle + image resolution
2018-02-15 16:10:25 +01:00
Yann Lanthony
6dec4c71c9 [ui][3D] fix error message at startup
use null instead of undefined as default Entity value for plugin-based viewers
2018-02-14 11:29:57 +01:00
Fabien Castan
2dceec447d Add 3D depth map viewer 2018-02-13 14:52:55 +01:00
Yann Lanthony
7da0bb16d0 [ui] 3D: improve scene lighting
attach a PointLight to the active camera to dynamically light the model
2018-02-01 15:24:37 +01:00
Yann Lanthony
fe53c582ab [ui] Viewer3D: don't multiply AlembicEntity's locators by current scale
Entity's transform scale is already taken into account by parenting (unlike particleSize that uses a custom shader for rendering and don't rely on transform's scale)
2018-01-30 12:05:50 +01:00
Yann Lanthony
a582a2f5c1 [ui] improve Alembic files loading
New version of AlembicEntity always clears itself when setting an url (even if it's invalid/empty). Don't need to re-create the AlembicEntity each time we load a file.
2018-01-29 14:46:28 +01:00
Yann Lanthony
fe944b0def [ui] Viewer3D: modify camera locator size in AlembicEntity 2018-01-15 21:47:13 +01:00
Yann Lanthony
04973fbf63 [ui] move sfm/mesh unloading to visibility control panel 2018-01-15 15:18:39 +01:00
Yann Lanthony
b9ceb47677 [ui] improve 3D Viewer
* rename Model > Mesh, Alembic > SfM
* add checkbox to control Mesh and SfM visibility
* transparentize visibility checkboxes that do not have a direct impact on the current scene (i.e: 'Textures' when the loaded mesh has no texture)
* move 3D content unloading into a contextual submenu
2018-01-09 20:22:52 +01:00
Yann Lanthony
cc4a24f5f3 [ui] 3D Viewer: Alembic support
* optional and only available if AlembicEntity QML plugin is in QML import path
* 3D viewer can load a 3D model and an Alembic file at the same time
* add contextual menu options to unload model/Alembic
2018-01-09 18:58:27 +01:00
Yann Lanthony
b8f61bf033 [ui] display output 3D files when double clicking on a node
* iterate over output attributes to find an "obj" file
* make default material brighter
2018-01-05 12:14:32 +01:00
Yann Lanthony
8d1d3fcba8 [ui] Viewer3D: minor clean
fix whitespaces/indentation/old comments
2017-12-14 19:17:37 +01:00
Yann Lanthony
d0a0f4491c [ui] Viewer2D: keep previous image displayed when source changes
* cache last loaded image and display it while the main Image is loading to avoid empty screen
* fix the BusyIndicator by dynamically creating a binding on the running property (Qt bug ?)
2017-12-14 16:39:29 +01:00
Yann Lanthony
3b10fd6200 [ui] MaterialSwitcher: fix diffuseColor property type
vector3d -> color
2017-12-12 20:17:24 +01:00
Yann Lanthony
2b8fc5bde2 [ui] Viewer3D: models textures can now be toggled
* remove DiffuseMapMaterial automatically created by the SceneLoader
* use MaterialSwitchers to create and dynamically switch materials on loaded Entities
* add a "Textures" checkbox to perform the toggle
2017-12-12 19:21:54 +01:00
Yann Lanthony
ecc376e3b6 [ui] Viewer3D: DefaultCameraController + better double click handling
* add DefaultCameraController: 
   * mouse-only navigation
   * keyboard modifiers fallbacks for view re-centering (Ctrl+LeftClick) and fast zooming (Alt+RightClick)
* improved double click handling for 3D Object Picking
  * moved logic/Timer to the CameraController
  * always use TrianglePicking but only activate the ObjectPicker when necessary
2017-12-12 19:10:18 +01:00
Yann Lanthony
762c3b518d [ui] Viewer3D: simplify model manipulation code
use direct properties rotationX/Y/Z and scale instead of manually creating the transformation matrix
2017-12-01 17:45:04 +01:00
Yann Lanthony
298526adcb [ui] improve ImageGallery
* new footer that displays the number of images / allow to change thumbnail size
* smaller sourceSize for thumbnails (faster to load)
* avoid Nan scales in Viewer2D when no image is loaded
2017-11-28 22:35:38 +01:00
Yann Lanthony
03ca18c312 [ui] improve Viewer3D
* add Rotation/Scale controls
* add controls to disable default items (grid/locator)
* add drop support to load external 3D models
* add "View All" action in contextual menu to fit to scene
* automatically propose to load the reconstructed mesh when available
2017-11-28 22:35:20 +01:00
Yann Lanthony
ae28a5477e [ui] add 3D viewer components 2017-11-17 19:02:24 +01:00
Yann Lanthony
c190f418b7 [ui] wip: add ImageGallery + Viewer2D to main layout
* ImageGallery displays images from CameraInit.viewpoints
* support drag&drop of images
* Viewer2D displays and allows basic manipulation of currently selected image
2017-11-14 18:14:44 +01:00