Page MenuHome

FBX Import Addon: Import focus distance for camera
Changes PlannedPublic

Authored by Steff Kempink (mswf) on Fri, Jan 24, 10:37 AM.

Details

Summary

Credits go to a coworker (he wanted to be referred to as "prutser") who was importing some camera animations, just wanted it to work, but not create a Blender account ;(.

After this patch FocusDistance is applied to the Blender camera.

Diff Detail

Event Timeline

Thank you for assigning the right person. I saw that he's owning 'Data, Assets & I/O'. As a first submit I still wasn't sure I was supposed to assign this add-on diff to someone directly.

That's fine, we don't expect you to know everything from the get-go. Congratulations on sending in your first patch :)

Steff Kempink (mswf) edited the summary of this revision. (Show Details)Fri, Jan 24, 11:30 AM
Bastien Montagne (mont29) requested changes to this revision.Fri, Jan 24, 4:59 PM

Patch looks good, except for the issues of scale regarding that new value, mentioned in comments below.

io_scene_fbx/import_fbx.py
644

According to doc (http://download.autodesk.com/us/fbx/SDKdocs/FBX_SDK_Help/files/fbxsdkref/class_k_fbx_camera.html) this value is in millimeters, so I think we need v / 1000 * global_scale here?

1527

Style (space around operators).

And as above, according to doc (http://download.autodesk.com/us/fbx/SDKdocs/FBX_SDK_Help/files/fbxsdkref/class_k_fbx_camera.html) this value is in millimeters, so I think we need elem_props_get_number(fbx_props, b'FocusDistance', 10 * 1000) / 1000 * global_scale here as well?

This revision now requires changes to proceed.Fri, Jan 24, 4:59 PM
Steff Kempink (mswf) planned changes to this revision.Fri, Jan 24, 5:12 PM

I will update the patch tomorrow or Monday and then offer it for review again.