[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.
This commit is contained in:
Yann Lanthony 2019-08-12 14:27:20 +02:00
parent 696d8d5340
commit 606cfc39c2
No known key found for this signature in database
GPG key ID: 519FAE6DF7A70642
3 changed files with 10 additions and 6 deletions

View file

@ -80,14 +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': Qt.binding(function() { return Viewer3DSettings.cameraScale }),
'enabled': Qt.binding(function() { return root.enabled })
'cameraPickingEnabled': Qt.binding(function() { return root.enabled })
});
obj.statusChanged.connect(function() {