mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-03 12:16:51 +02:00
* Inspector * changed "SETTINGS" to "DISPLAY" * new "CAMERA" section: activate camera synchronization + control image overlay * ImageOverlay: new component to display (undistorted) image on top of the 3D view * ViewpointCamera: new component that sets up a Camera based on a Viewpoint internal parameter * Viewer3D: additional ViewpointCamera to perform synchronization with image selection * Viewer3DSettings: new properties related to camera synchronization mode
49 lines
1.9 KiB
QML
49 lines
1.9 KiB
QML
pragma Singleton
|
|
import QtQuick 2.9
|
|
import MaterialIcons 2.2
|
|
|
|
/**
|
|
* Viewer3DSettings singleton gathers properties related to the 3D Viewer capabilities, state and display options.
|
|
*/
|
|
Item {
|
|
readonly property Component abcLoaderComp: Qt.createComponent("AlembicLoader.qml")
|
|
readonly property bool supportAlembic: abcLoaderComp.status == Component.Ready
|
|
readonly property Component depthMapLoaderComp: Qt.createComponent("DepthMapLoader.qml")
|
|
readonly property bool supportDepthMap: depthMapLoaderComp.status == Component.Ready
|
|
|
|
// supported 3D files extensions
|
|
readonly property var supportedExtensions: {
|
|
var exts = ['.obj'];
|
|
if(supportAlembic)
|
|
exts.push('.abc');
|
|
if(supportDepthMap)
|
|
exts.push('.exr');
|
|
return exts;
|
|
}
|
|
|
|
// Available render modes
|
|
readonly property var renderModes: [ // Can't use ListModel because of MaterialIcons expressions
|
|
{"name": "Solid", "icon": MaterialIcons.crop_din },
|
|
{"name": "Wireframe", "icon": MaterialIcons.details },
|
|
{"name": "Textured", "icon": MaterialIcons.texture },
|
|
]
|
|
// Current render mode
|
|
property int renderMode: 2
|
|
|
|
// Rasterized point size
|
|
property real pointSize: 1.5
|
|
// Whether point size is fixed or view dependent
|
|
property bool fixedPointSize: false
|
|
property real cameraScale: 0.3
|
|
// Helpers display
|
|
property bool displayGrid: true
|
|
property bool displayGizmo: true
|
|
property bool displayOrigin: false
|
|
// Camera
|
|
property bool syncViewpointCamera: false
|
|
property bool viewpointImageOverlay: true
|
|
property real viewpointImageOverlayOpacity: 0.5
|
|
readonly property bool showViewpointImageOverlay: syncViewpointCamera && viewpointImageOverlay
|
|
property bool viewpointImageFrame: false
|
|
readonly property bool showViewpointImageFrame: syncViewpointCamera && viewpointImageFrame
|
|
}
|