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:
authorMitchell Stokes <mogurijin@gmail.com>2011-05-28 11:15:27 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-05-28 11:15:27 +0400
commit07dca944766e702453730fe1a55605dab9380c6e (patch)
treec0ac8ab439ef1cd06154353f0d7fa3aa71862ecb /source/gameengine/Ketsji/KX_GameObject.cpp
parentbd5f78d1a0bf4e04800395952e9a26ba868cc31a (diff)
BGE Animation:
* Adding IPOs to BL_Action * Adding a "speed" option to adjust the playback speed by some factor
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 868dc4591e4..804a3d394ec 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -2992,18 +2992,18 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_GameObject, sendMessage,
}
KX_PYMETHODDEF_DOC(KX_GameObject, playAction,
- "playAction(name, start_frame, end_frame, layer=0, blendin=0, play_mode=ACT_MODE_PLAY, blend_mode=ACT_BLEND_NONE)\n"
+ "playAction(name, start_frame, end_frame, layer=0, blendin=0, play_mode=ACT_MODE_PLAY, blend_mode=ACT_BLEND_NONE, speed=1.0)\n"
"plays an action\n")
{
const char* name;
- float start, end, blendin=0.f;
+ float start, end, blendin=0.f, speed=1.f;
short layer=0;
short play_mode=0, blend_mode=0;
- static const char *kwlist[] = {"name", "start_frame", "end_frame", "layer", "blendin", "play_mode", "blend_mode", NULL};
+ static const char *kwlist[] = {"name", "start_frame", "end_frame", "layer", "blendin", "play_mode", "blend_mode", "speed", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "sff|hfhh", const_cast<char**>(kwlist),
- &name, &start, &end, &layer, &blendin, &play_mode, &blend_mode))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "sff|hfhhf", const_cast<char**>(kwlist),
+ &name, &start, &end, &layer, &blendin, &play_mode, &blend_mode, &speed))
return NULL;
if (layer < 0 || layer > MAX_ACTION_LAYERS)
@@ -3024,7 +3024,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, playAction,
blend_mode = BL_Action::ACT_BLEND_NONE;
}
- m_actionManager->PlayAction(this, name, start, end, layer, blendin, play_mode, blend_mode);
+ m_actionManager->PlayAction(this, name, start, end, layer, blendin, play_mode, blend_mode, speed);
Py_RETURN_NONE;
}