BIM+Draft: change object related version info to log messages

To inform the user warnings are shown if an object has new or modified properties in the current version. These warnings can however be confusing, especially if there are many. With this PR they are turned into log messages. They are also moved out of translation, and instead of the object Label the object Name is displayed.

Additionally:
Zero path length warnings for path arrays are now only displayed if the Align property is True.

See: #21180.
This commit is contained in:
Roy-043
2025-08-31 13:07:15 +02:00
committed by Yorik van Havre
parent 31cdf5bf5e
commit 8a13cbba67
16 changed files with 87 additions and 100 deletions

View File

@@ -39,8 +39,7 @@ from PySide.QtCore import QT_TRANSLATE_NOOP
import FreeCAD as App
import DraftVecUtils
from draftutils.messages import _wrn
from draftutils.translate import translate
from draftutils.messages import _log
from draftobjects.draftlink import DraftLink
@@ -71,9 +70,9 @@ class Array(DraftLink):
return
if not hasattr(obj, "Count"):
_wrn("v0.21, " + obj.Label + ", " + translate("draft", "added property 'Count'"))
_log("v0.21, " + obj.Name + ", added property 'Count'")
if not hasattr(obj, "PlacementList"):
_wrn("v1.1, " + obj.Label + ", " + translate("draft", "added hidden property 'PlacementList'"))
_log("v1.1, " + obj.Name + ", added hidden property 'PlacementList'")
self.set_general_properties(obj)
self.execute(obj) # Required to update Count and/or PlacementList.