Details
-
Technical task
-
Resolution: Done
-
P2: Important
-
None
Description
auto slide = presentation.newObject<Q3DSSlide>("slideN"); masterSlide->appendChildNode(slide); // associate objects with slides slide1->addObject(wonderfulCarModel); slide1->addObject(wonderfulCarSubMesh1Material); ... // specify property changes that are to be applied when entering the slide slide1->addPropertyChanges(wonderfulCarModel, new Q3DSPropertyChangeList { Q3DSPropertyChange::fromVariant(QLatin1String("rotation"), QVector3D(0, 180, 0)) }); // manage animation tracks Q3DSAnimationTrack anim(Q3DSAnimationTrack::Linear, model1, QLatin1String("rotation.z")); anim.setKeyFrames({ { 0, 0 }, { 10, 360 } }); // z rotation is 0 at 0 s, 360 at 10 s slide2->addAnimation(anim);
All these are observable via a familiar callback mechanism, so scenemanager & co will be happy as well:
id = slide1->addSlideObjectChangeObserver([...](Q3DSSlide *slide, const Q3DSSlide::SlideObjectChange &change) { ... });
Attachments
For Gerrit Dashboard: QT3DS-1175 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
220884,3 | Q3DSUipPresentation: unify to constref from constptr return values | master | qt3dstudio/qt3d-runtime | Status: MERGED | +2 | 0 |
220897,2 | Add slide graph notifications | master | qt3dstudio/qt3d-runtime | Status: MERGED | +2 | 0 |
220969,10 | Make slides and co programmatically constructible | master | qt3dstudio/qt3d-runtime | Status: MERGED | +2 | 0 |