1// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qt3dquick3danimationplugin.h"
5#include <Qt3DAnimation/qabstractclipanimator.h>
6#include <Qt3DAnimation/qabstractanimationclip.h>
7#include <Qt3DAnimation/qanimationclip.h>
8#include <Qt3DAnimation/qanimationcliploader.h>
9#include <Qt3DAnimation/qblendedclipanimator.h>
10#include <Qt3DAnimation/qclipanimator.h>
11#include <Qt3DAnimation/qchannelmapping.h>
12#include <Qt3DAnimation/qskeletonmapping.h>
13#include <Qt3DAnimation/qlerpclipblend.h>
14#include <Qt3DAnimation/qadditiveclipblend.h>
15#include <Qt3DAnimation/qclipblendvalue.h>
16#include <Qt3DAnimation/qclock.h>
17#include <Qt3DAnimation/qkeyframeanimation.h>
18#include <Qt3DAnimation/qanimationcontroller.h>
19#include <Qt3DAnimation/qabstractanimation.h>
20#include <Qt3DAnimation/qmorphinganimation.h>
21#include <Qt3DAnimation/qanimationgroup.h>
22#include <Qt3DAnimation/qmorphtarget.h>
23#include <Qt3DAnimation/qvertexblendanimation.h>
24
25#include <Qt3DQuickAnimation/private/qt3dquickanimation_global_p.h>
26#include <Qt3DQuickAnimation/private/quick3dchannelmapper_p.h>
27#include <Qt3DQuickAnimation/private/quick3dkeyframeanimation_p.h>
28#include <Qt3DQuickAnimation/private/quick3danimationgroup_p.h>
29#include <Qt3DQuickAnimation/private/quick3danimationcontroller_p.h>
30#include <Qt3DQuickAnimation/private/quick3dmorphtarget_p.h>
31#include <Qt3DQuickAnimation/private/quick3dmorphinganimation_p.h>
32#include <Qt3DQuickAnimation/private/quick3dvertexblendanimation_p.h>
33
34QT_BEGIN_NAMESPACE
35
36void Qt3DQuick3DAnimationPlugin::registerTypes(const char *uri)
37{
38 Qt3DAnimation::Quick::Quick3DAnimation_initialize();
39
40 // @uri Qt3D.Animation
41 qmlRegisterUncreatableType<Qt3DAnimation::QAbstractClipAnimator>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AbstractClipAnimator", QStringLiteral("QAbstractClipAnimator is abstract"));
42 qmlRegisterType<Qt3DAnimation::QClipAnimator>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ClipAnimator");
43 qmlRegisterType<Qt3DAnimation::QBlendedClipAnimator>(uri, versionMajor: 2, versionMinor: 9, qmlName: "BlendedClipAnimator");
44 qmlRegisterType<Qt3DAnimation::QChannelMapping>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ChannelMapping");
45 qmlRegisterUncreatableType<Qt3DAnimation::QAbstractAnimationClip>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AbstractAnimationClip", QStringLiteral("QAbstractAnimationClip is abstract"));
46 qmlRegisterType<Qt3DAnimation::QAnimationClipLoader>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AnimationClipLoader");
47 qmlRegisterType<Qt3DAnimation::QAnimationClip>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AnimationClip");
48 qmlRegisterExtendedType<Qt3DAnimation::QChannelMapper,
49 Qt3DAnimation::Animation::Quick::Quick3DChannelMapper>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ChannelMapper");
50 qmlRegisterUncreatableType<Qt3DAnimation::QAbstractClipBlendNode>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AbstractClipBlendNode", QStringLiteral("QAbstractClipBlendNode is abstract"));
51 qmlRegisterType<Qt3DAnimation::QLerpClipBlend>(uri, versionMajor: 2, versionMinor: 9, qmlName: "LerpClipBlend");
52 qmlRegisterType<Qt3DAnimation::QAdditiveClipBlend>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AdditiveClipBlend");
53 qmlRegisterType<Qt3DAnimation::QClipBlendValue>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ClipBlendValue");
54 qmlRegisterType<Qt3DAnimation::QClock>(uri, versionMajor: 2, versionMinor: 9, qmlName: "Clock");
55
56 qmlRegisterUncreatableType<Qt3DAnimation::QAbstractAnimation>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AbstractAnimation", QStringLiteral("AbstractAnimation is abstract"));
57 qmlRegisterExtendedType<Qt3DAnimation::QKeyframeAnimation, Qt3DAnimation::Quick::QQuick3DKeyframeAnimation>(uri, versionMajor: 2, versionMinor: 9, qmlName: "KeyframeAnimation");
58 qmlRegisterExtendedType<Qt3DAnimation::QAnimationGroup, Qt3DAnimation::Quick::QQuick3DAnimationGroup>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AnimationGroup");
59 qmlRegisterExtendedType<Qt3DAnimation::QAnimationController, Qt3DAnimation::Quick::QQuick3DAnimationController>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AnimationController");
60 qmlRegisterExtendedType<Qt3DAnimation::QMorphingAnimation, Qt3DAnimation::Quick::QQuick3DMorphingAnimation>(uri, versionMajor: 2, versionMinor: 9, qmlName: "MorphingAnimation");
61 qmlRegisterExtendedType<Qt3DAnimation::QMorphTarget, Qt3DAnimation::Quick::QQuick3DMorphTarget>(uri, versionMajor: 2, versionMinor: 9, qmlName: "MorphTarget");
62 qmlRegisterExtendedType<Qt3DAnimation::QVertexBlendAnimation, Qt3DAnimation::Quick::QQuick3DVertexBlendAnimation>(uri, versionMajor: 2, versionMinor: 9, qmlName: "VertexBlendAnimation");
63
64 qmlRegisterUncreatableType<Qt3DAnimation::QAbstractChannelMapping>(uri, versionMajor: 2, versionMinor: 10, qmlName: "AbstractChannelMapping", QStringLiteral("QAbstractChannelMapping is abstract"));
65 qmlRegisterType<Qt3DAnimation::QSkeletonMapping>(uri, versionMajor: 2, versionMinor: 10, qmlName: "SkeletonMapping");
66
67 // The minor version used to be the current Qt 5 minor. For compatibility it is the last
68 // Qt 5 release.
69 qmlRegisterModule(uri, versionMajor: 2, versionMinor: 15);
70}
71
72QT_END_NAMESPACE
73
74#include "moc_qt3dquick3danimationplugin.cpp"
75

source code of qt3d/src/quick3d/imports/animation/qt3dquick3danimationplugin.cpp