summaryrefslogtreecommitdiffstats
path: root/src/runtime/q3dsuippresentation_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-07-11 14:03:42 +0200
committerAndy Nichols <andy.nichols@qt.io>2018-07-16 08:16:13 +0000
commitf548947c3780285d103f9a4a947376596b8e41d1 (patch)
tree8ba20c10f8012786a832c4069e621f130b84f777 /src/runtime/q3dsuippresentation_p.h
parent39b8fbca67348b2c078b4e52b432e8979cf383ef (diff)
Enablers for adding and removing layers to the scene at run time
Adding, removing and reordering layers is almost in place now. Some things are still missing when it comes to cameras since the mvp in the vertex shaders for layers introduced on-the-fly is incorrect. Extend also setparent() in the console to allow inserting new subtrees at arbitrary places. Q3DSGraphObject already has the necessary APIs (insertChildNodeAfter and friends). Therefore, doing object(newlayer, newlayer, Layer, null, Slide1) object(newlayer_cam, newlayer_cam, Camera, newlayer, Slide1) ... setparent(newlayer, Scene) Adds the new layer after all existing layers (and thus to the bottom of the stack since the 3D Studio object tree (and the editor's visualization of the tree) assumes front-to-back ordering for the layers which is weird but that's what it is). To instead add to the top (i.e. before the existing Layer children of Scene), we can now do: setparent(newlayer, Scene, null) This also matches what clicking the "Add new layer" button in the editor would do. To implement moving layers around (to change their ordering), one can now simply do setparent(newlayer, Scene, SomeOtherLayer) (or the equivalent using the Q3DSGraphObject APIs) in order to move newlayer after SomeOtherLayer. Change-Id: I9c832e4299cb7398d97a799dce5eaa3cd5518a77 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/runtime/q3dsuippresentation_p.h')
-rw-r--r--src/runtime/q3dsuippresentation_p.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/runtime/q3dsuippresentation_p.h b/src/runtime/q3dsuippresentation_p.h
index 4601e15..c444c73 100644
--- a/src/runtime/q3dsuippresentation_p.h
+++ b/src/runtime/q3dsuippresentation_p.h
@@ -2009,7 +2009,6 @@ public:
std::function<void(Q3DSNode *)> f);
static void forAllLayers(Q3DSScene *scene, std::function<void(Q3DSLayerNode*)> f, bool reverse = false);
static void forAllModels(Q3DSGraphObject *obj, std::function<void(Q3DSModelNode *)> f, bool includeHidden = false);
- void forAllImages(std::function<void(Q3DSImage *)> f);
void notifyPropertyChanges(const Q3DSSlide::PropertyChanges &changeList) const;
void applyPropertyChanges(const Q3DSSlide::PropertyChanges &changeList) const;