mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix #3870. Bug where element filtering wasn't initialised properly when loading a camera for the first time.
Raster_x/y would only be set after the handler triggers. This is no longer necessary with the new explicit width / height properties.
This commit is contained in:
@@ -1661,12 +1661,9 @@ class Drawing(blenderbim.core.tool.Drawing):
|
||||
|
||||
@classmethod
|
||||
def get_elements_in_camera_view(cls, camera, objs):
|
||||
if bpy.context.scene.render.resolution_x > bpy.context.scene.render.resolution_y:
|
||||
x = camera.data.ortho_scale / 2
|
||||
y = (camera.data.BIMCameraProperties.raster_y / camera.data.BIMCameraProperties.raster_x) * x
|
||||
else:
|
||||
y = camera.data.ortho_scale / 2
|
||||
x = (camera.data.BIMCameraProperties.raster_x / camera.data.BIMCameraProperties.raster_y) * y
|
||||
props = camera.data.BIMCameraProperties
|
||||
x = props.width
|
||||
y = props.height
|
||||
|
||||
camera_inverse_matrix = camera.matrix_world.inverted()
|
||||
return set(
|
||||
|
||||
Reference in New Issue
Block a user