Skip to content

Commit

Permalink
fix customObj
Browse files Browse the repository at this point in the history
  • Loading branch information
shirubana committed Aug 4, 2022
1 parent 6731e43 commit 5de3b37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions bifacial_radiance/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,10 +742,8 @@ def boolConvert(d):
else:
sceneParamsDict['pitch']=round(float(sceneParamsDict2['pitch']),2)

try:
if "customObject" in sceneParamsDict2:
sceneParamsDict['customObject'] = sceneParamsDict2['customObject']
except:
sceneParamsDict['customObject'] = None

if simulationParamsDict['tracking']:
sceneParamsDict['axis_azimuth']=round(float(sceneParamsDict2['axis_azimuth']),2)
Expand Down
5 changes: 3 additions & 2 deletions bifacial_radiance/modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ def runModelChain(simulationParamsDict, sceneParamsDict, timeControlParamsDict=N
cellModule=cellModule, **kwargs)

if "customObject" in sceneParamsDict:
customObject = sceneParamsDict['customObject']
print("Custom Object Found, will be added to all Scenes.")
if sceneParamsDict["customObject"] is not None:
customObject = sceneParamsDict['customObject']
print("Custom Object Found, will be added to all Scenes.")
else:
customObject = None

Expand Down

0 comments on commit 5de3b37

Please sign in to comment.