We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 593dbbd commit a4f4264Copy full SHA for a4f4264
gempy/modules/json_io/json_operations.py
@@ -200,6 +200,14 @@ def load_model_from_json(file_path: str):
200
if fault_relations.shape == (len(model.structural_frame.structural_groups), len(model.structural_frame.structural_groups)):
201
model.structural_frame.fault_relations = fault_relations
202
203
+ # Set colors for each element
204
+ for series in data['series']:
205
+ if 'colors' in series:
206
+ for surface_name, color in zip(series['surfaces'], series['colors']):
207
+ element = model.structural_frame.get_element_by_name(surface_name)
208
+ if element is not None:
209
+ element.color = color
210
+
211
return model
212
213
@staticmethod
0 commit comments