Draft: fixed small bug in Draft unit test
This commit is contained in:
parent
2e6c94fc8e
commit
a36bf71632
|
@ -422,11 +422,12 @@ def formatObject(target,origin=None):
|
||||||
for p in matchrep.PropertiesList:
|
for p in matchrep.PropertiesList:
|
||||||
if not p in ["DisplayMode","BoundingBox","Proxy","RootNode","Visibility"]:
|
if not p in ["DisplayMode","BoundingBox","Proxy","RootNode","Visibility"]:
|
||||||
if p in obrep.PropertiesList:
|
if p in obrep.PropertiesList:
|
||||||
if hasattr(getattr(matchrep,p),"Value"):
|
if not obrep.getEditorMode(p):
|
||||||
val = getattr(matchrep,p).Value
|
if hasattr(getattr(matchrep,p),"Value"):
|
||||||
else:
|
val = getattr(matchrep,p).Value
|
||||||
val = getattr(matchrep,p)
|
else:
|
||||||
setattr(obrep,p,val)
|
val = getattr(matchrep,p)
|
||||||
|
setattr(obrep,p,val)
|
||||||
if matchrep.DisplayMode in obrep.listDisplayModes():
|
if matchrep.DisplayMode in obrep.listDisplayModes():
|
||||||
obrep.DisplayMode = matchrep.DisplayMode
|
obrep.DisplayMode = matchrep.DisplayMode
|
||||||
if hasattr(matchrep,"DiffuseColor") and hasattr(obrep,"DiffuseColor"):
|
if hasattr(matchrep,"DiffuseColor") and hasattr(obrep,"DiffuseColor"):
|
||||||
|
@ -998,13 +999,14 @@ def makeCopy(obj,force=None,reparent=False):
|
||||||
for p in obj.PropertiesList:
|
for p in obj.PropertiesList:
|
||||||
if not p in ["Proxy"]:
|
if not p in ["Proxy"]:
|
||||||
if p in newobj.PropertiesList:
|
if p in newobj.PropertiesList:
|
||||||
try:
|
if not newobj.getEditorMode(p):
|
||||||
setattr(newobj,p,obj.getPropertyByName(p))
|
|
||||||
except AttributeError:
|
|
||||||
try:
|
try:
|
||||||
setattr(newobj,p,obj.getPropertyByName(p).Value)
|
setattr(newobj,p,obj.getPropertyByName(p))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
try:
|
||||||
|
setattr(newobj,p,obj.getPropertyByName(p).Value)
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
if reparent:
|
if reparent:
|
||||||
parents = obj.InList
|
parents = obj.InList
|
||||||
if parents:
|
if parents:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user