FEM: materials task panel, fix: if material editor was canceled the material params were set to 0
This commit is contained in:
committed by
Yorik van Havre
parent
cba29e6ce6
commit
7e9c09b770
@@ -242,9 +242,14 @@ class _TaskPanelFemMaterial:
|
||||
|
||||
# ********* how to edit a material *********
|
||||
def edit_material(self):
|
||||
# opens the material editor to choose a material or edit material params
|
||||
# self.print_material_params()
|
||||
import MaterialEditor
|
||||
self.material = MaterialEditor.editMaterial(self.material)
|
||||
new_material_params = self.material.copy()
|
||||
MaterialEditor.editMaterial(new_material_params)
|
||||
# if the material editor was canceled a empty params dict will be returned, do not change the self.material
|
||||
if new_material_params is True:
|
||||
self.material = new_material_params
|
||||
self.check_material_keys()
|
||||
self.set_mat_params_in_input_fields(self.material)
|
||||
if self.has_transient_mat is False:
|
||||
|
||||
Reference in New Issue
Block a user