properly cleans up nametags
This commit is contained in:
parent
bc488bb495
commit
82a863831c
|
|
@ -327,9 +327,15 @@ class Actor(DirectObject, NodePath):
|
||||||
# assign these elements to ourselve (overwrite)
|
# assign these elements to ourselve (overwrite)
|
||||||
self.assign(otherCopy)
|
self.assign(otherCopy)
|
||||||
else:
|
else:
|
||||||
# just copy these to ourselve
|
# just copy these to ourselves
|
||||||
otherCopy = other.copyTo(self)
|
otherCopy = other.copyTo(self)
|
||||||
self.setGeomNode(otherCopy.getChild(0))
|
# masad: check if otherCopy has a geomNode as its first child
|
||||||
|
# if actor is initialized with flattenable, then otherCopy, not
|
||||||
|
# its first child, is the geom node; check __init__, for reference
|
||||||
|
if other.getGeomNode().getName() == other.getName():
|
||||||
|
self.setGeomNode(otherCopy)
|
||||||
|
else:
|
||||||
|
self.setGeomNode(otherCopy.getChild(0))
|
||||||
|
|
||||||
# copy the switches for lods
|
# copy the switches for lods
|
||||||
self.switches = other.switches
|
self.switches = other.switches
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue