1/****************************************************************************
2**
3** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt3D module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#include "qt3dquick3danimationplugin.h"
41#include <Qt3DAnimation/qabstractclipanimator.h>
42#include <Qt3DAnimation/qabstractanimationclip.h>
43#include <Qt3DAnimation/qanimationclip.h>
44#include <Qt3DAnimation/qanimationcliploader.h>
45#include <Qt3DAnimation/qblendedclipanimator.h>
46#include <Qt3DAnimation/qclipanimator.h>
47#include <Qt3DAnimation/qchannelmapping.h>
48#include <Qt3DAnimation/qskeletonmapping.h>
49#include <Qt3DAnimation/qlerpclipblend.h>
50#include <Qt3DAnimation/qadditiveclipblend.h>
51#include <Qt3DAnimation/qclipblendvalue.h>
52#include <Qt3DAnimation/qclock.h>
53#include <Qt3DAnimation/qkeyframeanimation.h>
54#include <Qt3DAnimation/qanimationcontroller.h>
55#include <Qt3DAnimation/qabstractanimation.h>
56#include <Qt3DAnimation/qmorphinganimation.h>
57#include <Qt3DAnimation/qanimationgroup.h>
58#include <Qt3DAnimation/qmorphtarget.h>
59#include <Qt3DAnimation/qvertexblendanimation.h>
60
61#include <Qt3DQuick/private/quick3dnodev9_p.h>
62#include <Qt3DQuickAnimation/private/qt3dquickanimation_global_p.h>
63#include <Qt3DQuickAnimation/private/quick3dchannelmapper_p.h>
64#include <Qt3DQuickAnimation/private/quick3dkeyframeanimation_p.h>
65#include <Qt3DQuickAnimation/private/quick3danimationgroup_p.h>
66#include <Qt3DQuickAnimation/private/quick3danimationcontroller_p.h>
67#include <Qt3DQuickAnimation/private/quick3dmorphtarget_p.h>
68#include <Qt3DQuickAnimation/private/quick3dmorphinganimation_p.h>
69#include <Qt3DQuickAnimation/private/quick3dvertexblendanimation_p.h>
70
71QT_BEGIN_NAMESPACE
72
73void Qt3DQuick3DAnimationPlugin::registerTypes(const char *uri)
74{
75 Qt3DAnimation::Quick::Quick3DAnimation_initialize();
76
77 // @uri Qt3D.Animation
78 qmlRegisterExtendedUncreatableType<Qt3DCore::QNode, Qt3DCore::Quick::Quick3DNodeV9, 9>(uri, versionMajor: 2, versionMinor: 9, qmlName: "Node", QStringLiteral("Node is a base class"));
79 qmlRegisterUncreatableType<Qt3DAnimation::QAbstractClipAnimator>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AbstractClipAnimator", QStringLiteral("QAbstractClipAnimator is abstract"));
80 qmlRegisterType<Qt3DAnimation::QClipAnimator>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ClipAnimator");
81 qmlRegisterType<Qt3DAnimation::QBlendedClipAnimator>(uri, versionMajor: 2, versionMinor: 9, qmlName: "BlendedClipAnimator");
82 qmlRegisterType<Qt3DAnimation::QChannelMapping>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ChannelMapping");
83 qmlRegisterUncreatableType<Qt3DAnimation::QAbstractAnimationClip>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AbstractAnimationClip", QStringLiteral("QAbstractAnimationClip is abstract"));
84 qmlRegisterType<Qt3DAnimation::QAnimationClipLoader>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AnimationClipLoader");
85 qmlRegisterType<Qt3DAnimation::QAnimationClip>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AnimationClip");
86 qmlRegisterExtendedType<Qt3DAnimation::QChannelMapper,
87 Qt3DAnimation::Animation::Quick::Quick3DChannelMapper>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ChannelMapper");
88 qmlRegisterUncreatableType<Qt3DAnimation::QAbstractClipBlendNode>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AbstractClipBlendNode", QStringLiteral("QAbstractClipBlendNode is abstract"));
89 qmlRegisterType<Qt3DAnimation::QLerpClipBlend>(uri, versionMajor: 2, versionMinor: 9, qmlName: "LerpClipBlend");
90 qmlRegisterType<Qt3DAnimation::QAdditiveClipBlend>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AdditiveClipBlend");
91 qmlRegisterType<Qt3DAnimation::QClipBlendValue>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ClipBlendValue");
92 qmlRegisterType<Qt3DAnimation::QClock>(uri, versionMajor: 2, versionMinor: 9, qmlName: "Clock");
93
94 qmlRegisterUncreatableType<Qt3DAnimation::QAbstractAnimation>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AbstractAnimation", QStringLiteral("AbstractAnimation is abstract"));
95 qmlRegisterExtendedType<Qt3DAnimation::QKeyframeAnimation, Qt3DAnimation::Quick::QQuick3DKeyframeAnimation>(uri, versionMajor: 2, versionMinor: 9, qmlName: "KeyframeAnimation");
96 qmlRegisterExtendedType<Qt3DAnimation::QAnimationGroup, Qt3DAnimation::Quick::QQuick3DAnimationGroup>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AnimationGroup");
97 qmlRegisterExtendedType<Qt3DAnimation::QAnimationController, Qt3DAnimation::Quick::QQuick3DAnimationController>(uri, versionMajor: 2, versionMinor: 9, qmlName: "AnimationController");
98 qmlRegisterExtendedType<Qt3DAnimation::QMorphingAnimation, Qt3DAnimation::Quick::QQuick3DMorphingAnimation>(uri, versionMajor: 2, versionMinor: 9, qmlName: "MorphingAnimation");
99 qmlRegisterExtendedType<Qt3DAnimation::QMorphTarget, Qt3DAnimation::Quick::QQuick3DMorphTarget>(uri, versionMajor: 2, versionMinor: 9, qmlName: "MorphTarget");
100 qmlRegisterExtendedType<Qt3DAnimation::QVertexBlendAnimation, Qt3DAnimation::Quick::QQuick3DVertexBlendAnimation>(uri, versionMajor: 2, versionMinor: 9, qmlName: "VertexBlendAnimation");
101
102 qmlRegisterUncreatableType<Qt3DAnimation::QAbstractChannelMapping>(uri, versionMajor: 2, versionMinor: 10, qmlName: "AbstractChannelMapping", QStringLiteral("QAbstractChannelMapping is abstract"));
103 qmlRegisterType<Qt3DAnimation::QSkeletonMapping>(uri, versionMajor: 2, versionMinor: 10, qmlName: "SkeletonMapping");
104
105 // Auto-increment the import to stay in sync with ALL future Qt minor versions
106 qmlRegisterModule(uri, versionMajor: 2, QT_VERSION_MINOR);
107}
108
109QT_END_NAMESPACE
110

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