Simplify object name log output
This commit is contained in:
parent
b72cc2c86d
commit
b1ff90e093
|
@ -358,7 +358,7 @@ class AsmElement(AsmBase):
|
|||
if not isinstance(link,tuple):
|
||||
return
|
||||
if isTypeOf(link[0],AsmPartGroup):
|
||||
logger.debug('migrate {}'.format(objName(obj)))
|
||||
logger.debug('migrate {}',objName(obj))
|
||||
sub = link[1]
|
||||
dot = sub.find('.')
|
||||
sobj = link[0].getSubObject(sub[:dot+1],1)
|
||||
|
|
|
@ -636,7 +636,8 @@ _makeProp('AtEnd','App::PropertyBool',
|
|||
_ordinal = ('1st', '2nd', '3rd', '4th', '5th', '6th', '7th')
|
||||
|
||||
def cstrName(obj):
|
||||
return '{}<{}>'.format(objName(obj),Constraint.getTypeName(obj))
|
||||
# return '{}<{}>'.format(objName(obj),Constraint.getTypeName(obj))
|
||||
return objName(obj)
|
||||
|
||||
|
||||
class Base(with_metaclass(Constraint, object)):
|
||||
|
|
4
utils.py
4
utils.py
|
@ -53,9 +53,7 @@ def addIconToFCAD(iconFile,path=None):
|
|||
|
||||
def objName(obj):
|
||||
try:
|
||||
if obj.Label == obj.Name:
|
||||
return '"{}#{}"'.format(obj.Document.Name,obj.Name)
|
||||
return '"{}#{}({})"'.format(obj.Document.Name,obj.Name,obj.Label)
|
||||
return getattr(obj,'FullName',obj.Name)
|
||||
except Exception:
|
||||
return '?'
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user