replace_material_pyleecan_obj (method)

replace_material_pyleecan_obj(obj, mat1, mat2, comp_name_path=True)[source]

replace first material by the second in the object

Parameters
  • obj (Pyleecan object) –

  • mat1 (Material) – material to replace

  • mat2 (Material) – new material

  • comp_name_path (bool) – replace strictly mat1 or replace materials without comparing mat1.path and mat1.name

Returns

is_change – True if a material has been replaced

Return type

bool