Replies: 1 comment 1 reply
-
Hello Sebastian, I'm fine and you ? I think this behaviour is caused in When a machine is loaded, its materials are compared with the one from the default material library. If one of the material is equal (except for name and path of the material) to one from the default material library, the machine material is "modified" to have the same reference as the one from machine library. It enables to automatically modify the machine material if the material library is edited. However as the path of the material has been modified, the machine is set to changed. I think that we can solve this behaviour by removing line 136 from MatLib.py : # Replace the material in the machine by the MatLib one (line 120 of the file)
else:
material.name = name
material.path = path
for mat in self.dict_mat["RefMatLib"]:
# Find the material in the matlib
if material == mat: # Same name and path
# No need to change the material
break
elif compare_material(material, mat):
# Replace material by mat in machine
is_change_mat = replace_material_pyleecan_obj(
machine, material, mat, False
)
is_change = is_change or is_change_mat # <--------------------- This line
break Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hello @CedMrnl,
I hope you are fine.
Is there a reason why a machine that is loaded to the GUI is immediately set to 'changed'? Is there a way to avoid this behaviour since it is misleading somehow.
Best regards, Sebastian
Beta Was this translation helpful? Give feedback.
All reactions