[core] add enabled property on attributes

The new property "enabled" allows to define a lambda to dynamically enable/disable parameters.
Disabled parameters are not used in the uid, not exported to the command line and not visible in the interface.
This commit is contained in:
Julien-Haudegond 2020-07-24 17:36:17 +02:00
parent f7b6b27a5a
commit 2d953d7319
4 changed files with 53 additions and 28 deletions

View file

@ -26,7 +26,7 @@ ListView {
model: attributes
delegate: Loader {
active: !object.desc.advanced || GraphEditorSettings.showAdvancedAttributes
active: object.enabled && (!object.desc.advanced || GraphEditorSettings.showAdvancedAttributes)
visible: active
height: item ? item.implicitHeight : -spacing // compensate for spacing if item is hidden