[ui] Viewer3D: add 'cameraScale' parameter to drive camera locator size

This commit is contained in:
Yann Lanthony 2018-12-07 14:55:12 +01:00
parent 1c070c7fdb
commit fc857d5dc8
2 changed files with 3 additions and 1 deletions

View file

@ -80,12 +80,13 @@ import Utils 1.0
id: abcLoaderEntityComponent
MediaLoaderEntity {
id: abcLoaderEntity
enabled: root.enabled
Component.onCompleted: {
var obj = Viewer3DSettings.abcLoaderComp.createObject(abcLoaderEntity, {
'source': source,
'pointSize': Qt.binding(function() { return 0.01 * Viewer3DSettings.pointSize }),
'locatorScale': 0.3
'locatorScale': Qt.binding(function() { return Viewer3DSettings.cameraScale })
});
obj.statusChanged.connect(function() {

View file

@ -24,6 +24,7 @@ Item {
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 displayLocator: true