summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMats Honkamaa <mats.honkamaa@qt.io>2018-03-14 13:08:17 +0200
committerMats Honkamaa <mats.honkamaa@qt.io>2018-03-19 11:47:13 +0000
commit113375774600c5297f1be4cb3771dcb4390f8795 (patch)
treee1dd38ae4703f29cf69c626d6fd6125f943d8361 /doc
parent8c3f48a0d1574bdef2aa710995fa163ced85bcef (diff)
Add documentation of editor side of behavior scripts
Added documentation on how to use behavior scripts in the editor Task-number: QT3DS-1270 Change-Id: I42d53f8f83b293cf21abbfb2c8a4feba7a19263e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/src/10-best-practices/96-behavior-scripts.qdoc72
-rw-r--r--doc/src/10-best-practices/practices-index.qdoc1
-rw-r--r--doc/src/images/behavior-library.pngbin0 -> 15549 bytes
-rw-r--r--doc/src/images/copy-transform-cubes.pngbin0 -> 1347 bytes
-rw-r--r--doc/src/images/copy-transform-scene-graph.pngbin0 -> 6143 bytes
-rw-r--r--doc/src/images/copy-transform-settings.pngbin0 -> 30970 bytes
6 files changed, 73 insertions, 0 deletions
diff --git a/doc/src/10-best-practices/96-behavior-scripts.qdoc b/doc/src/10-best-practices/96-behavior-scripts.qdoc
new file mode 100644
index 00000000..5c978696
--- /dev/null
+++ b/doc/src/10-best-practices/96-behavior-scripts.qdoc
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+
+\title Using Behavior Scripts
+\page using-behavior-scripts.html
+\ingroup using-behavior-scripts
+
+Qt 3D Studio supports using behavior scripts. Included in Studio is a
+set of behavior scripts. These can be found in the scripts asset library.
+
+It is possible to write new behavior scripts and use them in Studio. See
+\l{Behavior} for more information about that.
+
+Behavior scripts can be applied to objects to give the specific object a certain behavior. Behavior
+properties can be edited in the \e{inspector palette}.
+
+\section1 Add a Behavior
+
+This is an example on how to add a behavior and use it in your project. In this example we
+are using the CopyTransform behavior.
+
+\list 1
+ \li From the \e{project palette}, open the behavior library. Then select the
+ \c{CopyTransform.qml} file from the file dialog to import it to your project.
+ \image behavior-library.png
+ \li Add two cubes to the scene by dragging and dropping from the \e{basic objects palette}.
+ \li Move the cubes away from each other.
+ \image copy-transform-cubes.png
+ \li Animate the position of one of the cubes.
+ \li Drag the \c{CopyTransform} script from the \e{project palette} to the cube
+ (in the \e{scene graph}) that has no animation. The \c{CopyTransform} script appears as
+ a child object to the Cube.
+ \image copy-transform-scene-graph.png
+ \li Select the \c{CopyTransform} script in the \e{scene graph} and set the properties in the
+ \e{inspector palette}:
+ \list
+ \li Copy Target: The cube with the animation
+ \li Additive mode: True
+ \li Position: True
+ \li Start Immediately: True
+ \image copy-transform-settings.png
+ \endlist
+ \li Preview the presentation in the Viewer to see the result.
+\endlist
+
+*/
diff --git a/doc/src/10-best-practices/practices-index.qdoc b/doc/src/10-best-practices/practices-index.qdoc
index 41eb3303..071534d2 100644
--- a/doc/src/10-best-practices/practices-index.qdoc
+++ b/doc/src/10-best-practices/practices-index.qdoc
@@ -48,6 +48,7 @@
\li \l {Applying Layer Effects}
\li \l {Using Image-based Lighting}
\li \l {Using Data Inputs}
+\li \l {Using Behavior Scripts}
\endlist
//! [toc]
diff --git a/doc/src/images/behavior-library.png b/doc/src/images/behavior-library.png
new file mode 100644
index 00000000..c6cf35a8
--- /dev/null
+++ b/doc/src/images/behavior-library.png
Binary files differ
diff --git a/doc/src/images/copy-transform-cubes.png b/doc/src/images/copy-transform-cubes.png
new file mode 100644
index 00000000..9b4dd980
--- /dev/null
+++ b/doc/src/images/copy-transform-cubes.png
Binary files differ
diff --git a/doc/src/images/copy-transform-scene-graph.png b/doc/src/images/copy-transform-scene-graph.png
new file mode 100644
index 00000000..24e09c1a
--- /dev/null
+++ b/doc/src/images/copy-transform-scene-graph.png
Binary files differ
diff --git a/doc/src/images/copy-transform-settings.png b/doc/src/images/copy-transform-settings.png
new file mode 100644
index 00000000..2aed6795
--- /dev/null
+++ b/doc/src/images/copy-transform-settings.png
Binary files differ