[Bf-extensions-cvs] [080d74fe] master: Fix T86743: io_anim_camera addon needs updating

Campbell Barton noreply at git.blender.org
Tue Mar 8 06:54:06 CET 2022


Commit: 080d74fec1b65a5e5ba29143d8a70fc68902eb5a
Author: Campbell Barton
Date:   Tue Mar 8 16:53:11 2022 +1100
Branches: master
https://developer.blender.org/rBA080d74fec1b65a5e5ba29143d8a70fc68902eb5a

Fix T86743: io_anim_camera addon needs updating

Update path for the DOF distance, allow properties to be RNA paths.

===================================================================

M	io_anim_camera.py

===================================================================

diff --git a/io_anim_camera.py b/io_anim_camera.py
index 7973bec2..92948f58 100644
--- a/io_anim_camera.py
+++ b/io_anim_camera.py
@@ -25,7 +25,7 @@ def write_cameras(context, filepath, frame_start, frame_end, only_selected=False
         'lens',
         'shift_x',
         'shift_y',
-        'dof_distance',
+        'dof.focus_distance',
         'clip_start',
         'clip_end',
         'display_size',
@@ -60,7 +60,7 @@ def write_cameras(context, filepath, frame_start, frame_end, only_selected=False
     for obj, obj_data in cameras:
         fw("data = bpy.data.cameras.new(%r)\n" % obj.name)
         for attr in data_attrs:
-            fw("data.%s = %s\n" % (attr, repr(getattr(obj_data, attr))))
+            fw("data.%s = %s\n" % (attr, repr(obj_data.path_resolve(attr))))
 
         fw("obj = bpy.data.objects.new(%r, data)\n" % obj.name)



More information about the Bf-extensions-cvs mailing list