Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-05-23 13:36:18 +0400
committerJoshua Leung <aligorith@gmail.com>2009-05-23 13:36:18 +0400
commitd141aff097d17c106071f2ad966fdd97a1fb5ba4 (patch)
treeff73c044d7edd438798021d2f1c9c9f03cb52d91 /source/blender/blenkernel/intern/action.c
parent3b7f63a0884c6ec9db5abb938708f4191ea35274 (diff)
NLA SoC: Adding more backend code/utilities
* Data copying * Strip sorting
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r--source/blender/blenkernel/intern/action.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index f2e3583c87b..bb458cc7e25 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -740,7 +740,22 @@ float get_action_frame_inv(Object *ob, float cframe)
}
-
+/* Check if the given action has any keyframes */
+short action_has_motion(const bAction *act)
+{
+ FCurve *fcu;
+
+ /* return on the first F-Curve that has some keyframes/samples defined */
+ if (act) {
+ for (fcu= act->curves.first; fcu; fcu= fcu->next) {
+ if (fcu->totvert)
+ return 1;
+ }
+ }
+
+ /* nothing found */
+ return 0;
+}
/* Calculate the extents of given action */
void calc_action_range(const bAction *act, float *start, float *end, int incl_hidden)