Skip to content

Commit

Permalink
fix(dynamic): Ensure modifiers appear before geometry in .rad
Browse files Browse the repository at this point in the history
Thanks for finding this bug, Mikkel!
  • Loading branch information
chriswmackey committed Jul 12, 2021
1 parent 4943a3a commit 9006c5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions honeybee_radiance/dynamic/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def _process_bsdf_modifier(modifier, mod_strs, minimal):
mod_dup = modifier.duplicate() # duplicate to avoid editing the original
# the hidden _bsdf_file property is edited since the file has not yet been copied
mod_dup._bsdf_file = os.path.join('model', 'bsdf', bsdf_name)
mod_strs.append(mod_dup.to_radiance(minimal))
mod_strs.insert(1, mod_dup.to_radiance(minimal))

@staticmethod
def _instance_in_array(object_instance, object_array):
Expand Down Expand Up @@ -343,7 +343,7 @@ def blk_to_radiance(self, minimal=False):
if isinstance(mod, BSDF):
self._process_bsdf_modifier(mod, blk_str, minimal)
else:
blk_str.append(mod.to_radiance(minimal))
blk_str.insert(1, mod.to_radiance(minimal))
return '\n\n'.join(blk_str)

def tmxt_bsdf(self, state_index):
Expand Down

0 comments on commit 9006c5e

Please sign in to comment.