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