Merge pull request #9687 from Roy-043/Arch-more-consistent-object-naming-and-labelling

Arch: more consistent object naming and labelling
This commit is contained in:
Yorik van Havre
2023-05-30 15:18:00 +02:00
committed by GitHub
23 changed files with 107 additions and 103 deletions

View File

@@ -60,9 +60,9 @@ __author__ = "Yorik van Havre"
__url__ = "https://www.freecad.org"
def makeSite(objectslist=None,baseobj=None,name="Site"):
def makeSite(objectslist=None,baseobj=None,name=None):
'''makeBuilding(objectslist): creates a site including the
'''makeBuilding([objectslist],[baseobj],[name]): creates a site including the
objects from the given list.'''
if not FreeCAD.ActiveDocument:
@@ -70,7 +70,7 @@ def makeSite(objectslist=None,baseobj=None,name="Site"):
return
import Part
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Site")
obj.Label = translate("Arch",name)
obj.Label = name if name else translate("Arch","Site")
_Site(obj)
if FreeCAD.GuiUp:
_ViewProviderSite(obj.ViewObject)