Commit graph

9 commits

Author SHA1 Message Date
Yann Lanthony
63ffb20819
[ui][3D] add EnvironmentMapEntity to display equirectangular images
Load EXR files in the 3D viewport as environment maps mapped on a sphere "attached"  to the camera.
* improve exr loading strategy by considering depthmaps and env maps
* update to DepthMapEntity 2.1 (required to get the loading status)
2019-12-13 17:17:03 +01:00
Yann Lanthony
606cfc39c2
[ui] Viewer3D: fix Alembic visibility issues
Binding the "enabled" property of AlembicLoader's ObjectPicker to the parent MediaLoader's own "enabled" property caused invalid state where the loaded AlembicEntity was partially visible when toggling object visibility (since Qt 5.13).
In order to disable camera picking when AlembicEntity is disable, scale the camSelector component to 0.
2019-08-12 17:58:43 +02:00
Yann Lanthony
da1b842493 [ui] MediaLibrary: enable dynamicRoles on mediaModel
If an outside 3D media file is the first thing ever loaded, 'model.attribute' will be initialized to 'null' and will prevent an actual Attribute to be associated to this role. This breaks media loading from within Meshroom.
2019-02-07 19:55:05 +01:00
Yann Lanthony
6a297d5bff [ui][Viewer3D] fix cache update and reparenting issues
* don't try to put object in cache on MediaLoader 'Component.onCompleted' callback ; only effect was to put back in cache a media retrieved from cache during 'onFinalSourceChanged'
* redesign 'updateModelAndCache' as 'updateModel' and 'updateCacheAndModel' for this purpose
* wait for MediaLoader full initialization (@ 'NodeInstiator.onObjectAdded' callback) to reparent an object retrieved from cache; otherwise it silently fails.
2019-01-31 16:07:33 +01:00
Yann Lanthony
5814a39e3e [ui] Viewer3D: add loading overlay with BusyIndicator 2018-12-13 17:15:24 +01:00
Yann Lanthony
edfc34fbd1 [ui] Viewer3D: remove media if no loader was found for a valid source 2018-12-13 17:15:19 +01:00
Yann Lanthony
c3750a33c3 [ui] Inspector3D: add media contextual menu
Contextual menu to expose additional actions:
 * open media containing folder
 * copy media path
 * advanced manual control over media (un)loading
+ fix MediaLibrary to avoid binding loop on 'visible' when directly modifying 'request' property
2018-12-10 15:13:26 +01:00
Yann Lanthony
2e06ad1b83 [ui] 3DViewer: make 'visible' property drive media load request
* remove the notion of manual media (un)loading from high-level UI
* visibility button now drives media loading:
   * if media is not available (not yet computed), it will be loaded once available if visibility is on
   * once loaded, media can't be explicitly unloaded 
* use an icon to indicate that the media is not available instead of colors
2018-12-07 16:07:41 +01:00
Yann Lanthony
109b980ae5 [ui] Viewer3D: introduce new 3D media loading backend
This commit adds several components to centralize and extend 3D media loading. They are not yet integrated into Viewer3D. The entry point to this system is the MediaLibrary component that:
    * can load N medias based on a filepath or load-and-watch node attributes
    * provides a cache mechanism to instant-reload medias that were unloaded under certain conditions
    * gives access to statistics (vertex/face/camera/textureCount) through a unified interface
2018-12-07 15:57:57 +01:00