Mateo de Mayo
23f54076db
BGE: Added getActionName() function to KX_GameObject()
...
It works similar to getActionFrame(), you have to give a layer or not (for layer 0) as the argument and it returns the name of the animation that the object is currently playing.
Example:
```
import bge
own = bge.logic.getCurrentController().owner
own.playAction("SomeAction",0,20)
print(own.getActionName())
```
>> SomeAction
Here is an example file, just open the blend file with the terminal opened
and press P, you can see how the current animation is being printed:
{F217484}
Reviewers: moguri, hg1, panzergame, campbellbarton
Reviewed By: panzergame
Subscribers: campbellbarton, hg1, #game_engine
Projects: #game_engine
Differential Revision: https://developer.blender.org/D1443
2015-08-04 00:10:33 +02:00
..
2015-07-12 16:58:12 +02:00
2015-08-04 00:10:33 +02:00
2015-08-04 00:10:33 +02:00
2015-08-04 00:10:33 +02:00
2015-08-04 00:10:33 +02:00
2015-07-20 22:29:26 +02:00
2015-07-14 22:36:00 +10:00
2015-07-14 22:36:00 +10:00
2014-10-07 15:47:32 -05:00
2015-07-12 16:58:12 +02:00
2015-07-27 20:34:13 +02:00
2015-07-28 14:01:53 +02:00
2015-07-14 22:36:00 +10:00
2015-07-14 22:36:00 +10:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-07-25 09:43:06 +02:00
2015-07-25 09:43:06 +02:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-06-22 18:16:31 +02:00
2014-10-07 15:47:32 -05:00
2015-07-12 16:58:12 +02:00
2015-03-16 18:46:40 +01:00
2015-06-05 11:16:46 +10:00
2015-08-04 00:10:33 +02:00
2015-08-04 00:10:33 +02:00
2015-07-12 16:58:12 +02:00
2015-05-11 23:05:04 -07:00
2015-03-23 21:43:42 +01:00
2015-07-12 16:58:12 +02:00
2015-07-28 14:01:52 +02:00
2015-07-12 16:58:12 +02:00
2015-04-26 16:29:58 +02:00
2015-04-26 16:29:58 +02:00
2014-03-27 22:32:06 -07:00
2014-04-12 20:12:07 +02:00
2015-05-11 23:05:04 -07:00
2015-07-12 16:58:12 +02:00
2015-06-14 04:53:10 +10:00
2015-06-14 04:53:10 +10:00
2015-07-25 09:43:06 +02:00
2014-07-21 10:53:07 +10:00
2015-07-28 13:54:41 +02:00
2015-07-12 16:58:12 +02:00
2014-02-22 13:57:12 +11:00
2015-06-02 11:08:17 +10:00
2015-05-14 09:45:51 +02:00
2015-07-12 16:58:12 +02:00
2015-06-20 14:21:31 +02:00
2015-07-12 16:58:12 +02:00
2015-02-03 15:32:54 +00:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-07-28 14:01:53 +02:00
2015-07-12 16:58:12 +02:00
2015-07-03 11:47:48 +02:00
2015-02-09 20:56:38 +00:00
2015-07-12 16:58:12 +02:00
2015-07-25 09:43:06 +02:00
2014-06-17 22:13:44 +10:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-07-16 12:53:20 -03:00
2015-07-12 16:58:12 +02:00
2015-08-02 11:27:02 +02:00
2015-07-28 14:01:53 +02:00
2015-03-21 17:54:49 +01:00
2015-02-18 23:24:02 +01:00
2015-02-08 15:52:13 +01:00
2015-02-08 15:52:13 +01:00
2015-07-25 09:43:06 +02:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2014-07-14 18:30:27 -07:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-06-06 13:12:27 -07:00
2015-06-06 13:12:27 -07:00
2015-06-24 13:03:23 +02:00
2015-07-12 16:58:12 +02:00
2015-03-23 21:43:42 +01:00
2015-03-23 21:43:42 +01:00
2015-07-28 14:01:53 +02:00