Skip to content

Commit

Permalink
feat(index): Add 50% transparency to Apertures
Browse files Browse the repository at this point in the history
  • Loading branch information
devangcx committed Jan 22, 2021
1 parent a7462bb commit 36ac29f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion honeybee_vtk/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"edgeVisibility": 0,
"diffuseColor": None,
"pointSize": 5,
"opacity": 1
"opacity": None
}
}

Expand All @@ -76,11 +76,20 @@ def write_index_json(target_folder, layer_names):
A text string containing the path to the index.json file.
"""
datasets = []

for layer_name in layer_names:

# Set opacity for Apertures
if layer_name == 'Aperture':
opacity_value = 0.5
else:
opacity_value = 1

template = copy.deepcopy(dataset_template)
template['name'] = layer_name
template['httpDataSetReader']['url'] = layer_name
template['property']['diffuseColor'] = layer_colors[layer_name]
template['property']['opacity'] = opacity_value
datasets.append(template)

index = copy.deepcopy(index_template)
Expand Down

0 comments on commit 36ac29f

Please sign in to comment.