Skip to content

Commit

Permalink
fix(bsdf): Always include bsdf in Model-Rad-Folder for now
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Jun 27, 2021
1 parent 0cefe0f commit d756ea3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions honeybee_radiance/modifier/material/bsdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@
import honeybee.typing as typing
import ladybug_geometry.geometry3d.pointvector as pv

import gzip
try:
from io import BytesIO as StringIO
except ImportError:
try: # python 2
from cStringIO import StringIO
except ImportError: # IronPython
from StringIO import StringIO


class BSDF(Material):
"""Radiance BSDF material.
Expand Down Expand Up @@ -310,7 +301,8 @@ def from_primitive_dict(cls, primitive_dict):
angle_basis=None,
dependencies=dependencies
)
if 'display_name' in primitive_dict and primitive_dict['display_name'] is not None:
if 'display_name' in primitive_dict and \
primitive_dict['display_name'] is not None:
cls_.display_name = primitive_dict['display_name']

# this might look redundant but it is NOT. see glass for explanation.
Expand Down
2 changes: 1 addition & 1 deletion honeybee_radiance/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ def model_to_rad_folder(
# copy all bsdfs into the bsdf folder
bsdf_folder = model_folder.bsdf_folder(full=True)
bsdf_mods = model.properties.radiance.bsdf_modifiers
preparedir(bsdf_folder)
if len(bsdf_mods) != 0:
preparedir(bsdf_folder)
for bdf_mod in bsdf_mods:
bsdf_name = os.path.split(bdf_mod.bsdf_file)[-1]
new_bsdf_path = os.path.join(bsdf_folder, bsdf_name)
Expand Down

0 comments on commit d756ea3

Please sign in to comment.