diff options
author | Kevin Ottens <kevin.ottens@kdab.com> | 2016-07-20 10:04:46 +0200 |
---|---|---|
committer | Kevin Ottens <kevin.ottens@kdab.com> | 2016-07-20 11:47:03 +0000 |
commit | 6254f25982e1138e7cf6d835d6d3467e7e597d3a (patch) | |
tree | 4c871ee2570a43063cacf6c317159de7ad227a4d /src/render/geometry/qgeometry.h | |
parent | 44f1a92338859f1cc043ec22e0142037b5f87936 (diff) |
Allow to add/remove attributes imperatively in QML
If one needs to add an attribute to an existing geometry property,
currently the attributes property isn't available in such a situation.
This is especially problematic with Mesh. For now, simply give access to
addAttribute and removeAttribute on the QML side, so that it can be
workarounded imperatively for the time being.
Change-Id: I8f4d675d962f084c1c4e0ab4aecc907ae891f83a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/geometry/qgeometry.h')
-rw-r--r-- | src/render/geometry/qgeometry.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/geometry/qgeometry.h b/src/render/geometry/qgeometry.h index 70fea8cd9..143d98d1e 100644 --- a/src/render/geometry/qgeometry.h +++ b/src/render/geometry/qgeometry.h @@ -59,8 +59,8 @@ public: ~QGeometry(); QVector<QAttribute *> attributes() const; - void addAttribute(QAttribute *attribute); - void removeAttribute(QAttribute *attribute); + Q_INVOKABLE void addAttribute(Qt3DRender::QAttribute *attribute); + Q_INVOKABLE void removeAttribute(Qt3DRender::QAttribute *attribute); QAttribute *boundingVolumePositionAttribute() const; |