def _set_mat_type(self, value):
    'setter of mat_type'
    if isinstance(value, str):
        value = load_init_dict(value)[1]
    if (isinstance(value, dict) and ('__class__' in value)):
        class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'mat_type')
        value = class_obj(init_dict=value)
    elif ((type(value) is int) and (value == (- 1))):
        value = Material()
    check_var('mat_type', value, 'Material')
    self._mat_type = value
    if (self._mat_type is not None):
        self._mat_type.parent = self
setter of mat_type
def _set_mat_type(self, value):
    
    if isinstance(value, str):
        value = load_init_dict(value)[1]
    if (isinstance(value, dict) and ('__class__' in value)):
        class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'mat_type')
        value = class_obj(init_dict=value)
    elif ((type(value) is int) and (value == (- 1))):
        value = Material()
    check_var('mat_type', value, 'Material')
    self._mat_type = value
    if (self._mat_type is not None):
        self._mat_type.parent = self