mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
protect actors from flattening
This commit is contained in:
parent
e11f759e48
commit
de3df71909
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user