protect actors from flattening

This commit is contained in:
David Rose 2002-07-31 16:33:21 +00:00
parent e11f759e48
commit de3df71909

View File

@ -92,8 +92,12 @@ class Actor(PandaObject, NodePath):
# create base hierarchy # create base hierarchy
self.gotName = 0 self.gotName = 0
self.assign(hidden.attachNewNode('actor')) root = ModelNode('actor')
self.setGeomNode(self.attachNewNode('actorGeom')) root.setPreserveTransform(1)
# temporary support for old Panda
#self.assign(NodePath(root))
self.assign(hidden.attachNewNode(root))
self.setGeomNode(self.attachNewNode(ModelNode('actorGeom')))
self.__hasLOD = 0 self.__hasLOD = 0
# load models # load models
@ -181,6 +185,8 @@ class Actor(PandaObject, NodePath):
# copy the scene graph elements of other # copy the scene graph elements of other
otherCopy = other.copyTo(hidden) otherCopy = other.copyTo(hidden)
# temporarily commented out for old Panda
#otherCopy.detachNode()
# assign these elements to ourselve # assign these elements to ourselve
self.gotName = other.gotName self.gotName = other.gotName
self.assign(otherCopy) self.assign(otherCopy)