mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Fixed a bug in flatten function definition
This commit is contained in:
parent
e0876b9eae
commit
ccee14a50b
@ -220,6 +220,13 @@ class ObjectMgrBase:
|
|||||||
else:
|
else:
|
||||||
return self.objects[uid]
|
return self.objects[uid]
|
||||||
|
|
||||||
|
def findObjectByNodePathBelow(self, nodePath):
|
||||||
|
for ancestor in nodePath.getAncestors():
|
||||||
|
if ancestor.hasTag('OBJRoot'):
|
||||||
|
return self.findObjectByNodePath(ancestor)
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
def findObjectsByTypeName(self, typeName):
|
def findObjectsByTypeName(self, typeName):
|
||||||
results = []
|
results = []
|
||||||
for uid in self.objects.keys():
|
for uid in self.objects.keys():
|
||||||
@ -768,7 +775,7 @@ class ObjectMgrBase:
|
|||||||
newobj = self.addNewObject(typeName, uid, parent=parentNP, fSelectObject=False)
|
newobj = self.addNewObject(typeName, uid, parent=parentNP, fSelectObject=False)
|
||||||
newobj.setMat(mat)
|
newobj.setMat(mat)
|
||||||
|
|
||||||
def flatten(self, newobjModel, objDef, uid):
|
def flatten(self, newobjModel, model, objDef, uid):
|
||||||
# override this to flatten models
|
# override this to flatten models
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user