diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2015-11-07 15:23:29 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2015-11-07 15:23:29 +0300 |
commit | 91715100aa8145edc21e5448e79b19ee88603662 (patch) | |
tree | a9f6ca947bcd45fd87f57a9b2d24514603e9bdd0 /io_anim_bvh/__init__.py | |
parent | 407d0ea752b3af73d3f13ba072671bd09eefecb1 (diff) |
BVH import: added option to update scene from the BVH.
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.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Maniphest Tasks: T34919
Differential Revision: https://developer.blender.org/D1608
Diffstat (limited to 'io_anim_bvh/__init__.py')
-rw-r--r-- | io_anim_bvh/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/io_anim_bvh/__init__.py b/io_anim_bvh/__init__.py index 57f879c0..85534048 100644 --- a/io_anim_bvh/__init__.py +++ b/io_anim_bvh/__init__.py @@ -92,6 +92,18 @@ class ImportBVH(bpy.types.Operator, ImportHelper, ImportBVHOrientationHelper): "BVH frame maps directly to a Blender frame"), default=False, ) + update_scene_fps = BoolProperty( + name="Update scene framerate", + description="Sets the scene framerate to that of the BVH file. Note that this " + "nullifies the 'Scale FPS' option, as the scale will be 1:1", + default=False + ) + update_scene_duration = BoolProperty( + name="Update scene duration", + description="Extend the scene's duration to the BVH duration. Does not shorten scene " + "when the BVH fits in its entirety", + default=False, + ) use_cyclic = BoolProperty( name="Loop", description="Loop the animation playback", |