Page MenuHome

BVH import: added option to update scene from the BVH.
ClosedPublic

Authored by Sybren A. Stüvel (sybren) on Nov 7 2015, 1:11 PM.

Details

Summary

This commit adds two options to the BVH importer to adjust the scene's
frame rate and duration to that of the BVH file. Since different BVHs
have different frame rates, this makes it possible to import BVH files
for inspection in Blender without having to manually open the BVH file
to find its frame rate and duration. The scene is only extended to fit
the BVH file, and never shortened.

There already exists an option for the opposite, to scale the BVH
animation data to the scene's frame rate. This did not take into account
the scene.render.fps_base property, which is also fixed by this commit.

This closes task T34919.

Diff Detail

Repository
rBA Blender Add-ons
Branch
master

Event Timeline

Sybren A. Stüvel (sybren) retitled this revision from to BVH import: added option to update scene from the BVH..
Sybren A. Stüvel (sybren) updated this object.
This revision is now accepted and ready to land.Nov 7 2015, 1:16 PM
This comment has been deleted.
io_anim_bvh/import_bvh.py
661–662

From user perspective, this is probably better set as a warning?

The file can still load, just report a warning in this case.

The way I've done this in other scripts is to take the report callback as an argument.

See: release/scripts/modules/bpy/utils/__init__.py:497:def keyconfig_set(filepath, report=None):

This revision was automatically updated to reflect the committed changes.
Sybren A. Stüvel (sybren) marked an inline comment as done.Nov 7 2015, 2:53 PM
Sybren A. Stüvel (sybren) added inline comments.
io_anim_bvh/import_bvh.py
661–662

Done in D1609