Fix error in case FBX file specifies no known pre-defined FPS and a null custom fps value...

Patch by Julian (joolsa).

Differential Revision: https://developer.blender.org/D1551
This commit is contained in:
Bastien Montagne 2015-10-13 18:02:02 +02:00
parent ecdc7c03ec
commit 7ef985757d
2 changed files with 3 additions and 3 deletions

View File

@ -21,8 +21,8 @@
bl_info = {
"name": "FBX format",
"author": "Campbell Barton, Bastien Montagne, Jens Restemeier",
"version": (3, 6, 2),
"blender": (2, 74, 0),
"version": (3, 6, 3),
"blender": (2, 76, 0),
"location": "File > Import-Export",
"description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions",
"warning": "",

View File

@ -2315,7 +2315,7 @@ def load(operator, context, filepath="",
custom_fps = elem_props_get_number(fbx_settings_props, b'CustomFrameRate', 25.0)
time_mode = elem_props_get_enum(fbx_settings_props, b'TimeMode')
real_fps = {eid: val for val, eid in FBX_FRAMERATES[1:]}.get(time_mode, custom_fps)
if real_fps < 0.0:
if real_fps <= 0.0:
real_fps = 25.0
scene.render.fps = round(real_fps)
scene.render.fps_base = scene.render.fps / real_fps