Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_cameras.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_cameras.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_cameras.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_cameras.py
index 585f0be3..bb211fe2 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_cameras.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_cameras.py
@@ -92,18 +92,18 @@ def __gather_perspective(blender_camera, export_settings):
width = bpy.context.scene.render.pixel_aspect_x * bpy.context.scene.render.resolution_x
height = bpy.context.scene.render.pixel_aspect_y * bpy.context.scene.render.resolution_y
- perspective.aspectRatio = width / height
+ perspective.aspect_ratio = width / height
if width >= height:
if blender_camera.sensor_fit != 'VERTICAL':
- perspective.yfov = 2.0 * math.atan(math.tan(blender_camera.angle * 0.5) / perspective.aspectRatio)
+ perspective.yfov = 2.0 * math.atan(math.tan(blender_camera.angle * 0.5) / perspective.aspect_ratio)
else:
perspective.yfov = blender_camera.angle
else:
if blender_camera.sensor_fit != 'HORIZONTAL':
perspective.yfov = blender_camera.angle
else:
- perspective.yfov = 2.0 * math.atan(math.tan(blender_camera.angle * 0.5) / perspective.aspectRatio)
+ perspective.yfov = 2.0 * math.atan(math.tan(blender_camera.angle * 0.5) / perspective.aspect_ratio)
perspective.znear = blender_camera.clip_start
perspective.zfar = blender_camera.clip_end