[Bf-gamedev] Using blender timeline features

Sybren A. Stüvel sybren at stuvel.eu
Sat Jun 13 12:52:26 CEST 2015


Hi Owen,

On Sat, Jun 13, 2015 at 06:35:57PM +0800, Owen Alanzo Hogarth wrote:
> Blender has the timeline feature where you can animate an object and
> play it back using the timeline. In the game engine I wouldn't need
> to be able to edit the bones and their attributes but I would like
> to be able to get their position rotations, angle, scale etc.
> 
> Let's say that I author a 2 second animation in blender where I
> translate, rotate and scale a cube. Blender stores all this data
> somewhere so that when I press the play button it can recreate the
> animation in blender engine.
> 
> What if I could export that data as say json for example, then load
> that data into a game engine and play the animation in engine.

That's a long way around. You can create Actions in Blender. Drag the
Blend file into Unity, or start the Blender Game Engine, and those
actions are directly available. There is no need to save to JSON,
depending on which game engine you want to use. For some engines that
don't directly load Blend files, there are exporter addons specific to
that engine, or to file formats that are widely supported.

Of course, if you want to export to JSON just for the experience of
accessing data from Blender and writing it to a file, that's a whole
different story. In that case, check out the
bpy.types.Object.animation_data property [1], and what you can find
from there. 


[1] http://www.blender.org/api/blender_python_api_2_74_release/bpy.types.Object.html#bpy.types.Object.animation_data

-- 
Sybren A. Stüvel

http://stuvelfoto.nl/
http://stuvel.eu/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
Url : http://lists.blender.org/pipermail/bf-gamedev/attachments/20150613/fb3eceaf/attachment.pgp 


More information about the Bf-gamedev mailing list