Revert optional pyradiance 41e6478 #6633

Since issue is resolved upstream and there's no need to keep import optional.
This commit is contained in:
Andrej730
2025-07-16 11:22:40 +05:00
parent d55e7faf2a
commit 0dc17a2141
3 changed files with 2 additions and 35 deletions
+1 -14
View File
@@ -25,20 +25,7 @@ from pathlib import Path
import importlib
import importlib.util
import traceback
# There are unresolved problems with pyradiance import that we couldn't narrow down.
# So import is optional not to make it a showstopper for random users,
# who don't even need pyradiance.
# See #6633.
try:
import pyradiance
except ImportError as e:
print(traceback.format_exc())
print(
"PyRadiance is not available. Pyradiance Rendering functionality will be disabled. "
"See above for more detailed import traceback."
)
pyradiance = None
import pyradiance
def get_pyradiance_path():
@@ -18,11 +18,7 @@
import os
try:
import pyradiance as pr
except ImportError:
pr = None
import pyradiance as pr
from datetime import datetime
import bpy
import bonsai.tool as tool
@@ -137,10 +133,6 @@ class RadianceRender(bpy.types.Operator):
bl_description = "Renders the scene using Radiance"
def execute(self, context):
if pr is None:
self.report({"ERROR"}, "PyRadiance is not available. Cannot perform rendering.")
return {"CANCELLED"}
print("Starting Radiance rendering process...")
props = tool.Blender.get_radiance_exporter_props()
resolution_x, resolution_y = props.radiance_resolution_x, props.radiance_resolution_y
-12
View File
@@ -21,11 +21,6 @@ import bonsai.tool as tool
from typing import TYPE_CHECKING
from bonsai.bim.module.light.data import SolarData
try:
import pyradiance
except ImportError:
pyradiance = None
class BIM_PT_radiance_exporter(bpy.types.Panel):
"""Creates a Panel in the render properties window"""
@@ -43,13 +38,6 @@ class BIM_PT_radiance_exporter(bpy.types.Panel):
layout = self.layout
props = tool.Blender.get_radiance_exporter_props()
if pyradiance is None:
box = layout.box()
box.label(text="There was a problem importing Pyradiance", icon="ERROR")
box.label(text="and it's functionality is not available.")
box.label(text="See system console logs at Bonsai startup.")
return
if tool.Ifc.get():
row = self.layout.row()
row.prop(props, "should_load_from_memory")