mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Forgot to CVS ADd function to return node path collection as lisTd
This commit is contained in:
parent
66175b4663
commit
62208fa7cc
16
direct/src/extensions/NodePathCollection-extensions.py
Normal file
16
direct/src/extensions/NodePathCollection-extensions.py
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
"""
|
||||
NodePathCollection-extensions module: contains methods to extend
|
||||
functionality of the NodePathCollection class
|
||||
"""
|
||||
|
||||
# For iterating over children
|
||||
def asList(self):
|
||||
"""Converts a NodePathCollection into a list"""
|
||||
if self.isEmpty():
|
||||
return []
|
||||
else:
|
||||
npList = []
|
||||
for nodePathIndex in range(self.getNumPaths()):
|
||||
npList.append(self.getPath(nodePathIndex))
|
||||
return npList
|
Loading…
x
Reference in New Issue
Block a user