please recommend a simple way to recursively scale a NodePath’s size and all its children’s sizes and positions.
i want to use normalized local coordinates and control the overall scale at the root.
please recommend a simple way to recursively scale a NodePath’s size and all its children’s sizes and positions.
i want to use normalized local coordinates and control the overall scale at the root.
What do you mean by scaling a nodePath?
I assume you mean a model on a node in your Scene Graph.
Properties like position are automatically inherited by the children - try and see if Panda does the things you want by default.
Have fun,
Rainbow Brite
I think thats true
But here is the code for getting all children:
def childs(node):
if node.getNumChildren() == 0:
#do your work here
return
else:
for i in range(0, node.getNumChildren() ):
childs(node.getChild(i))
return
Or if you just want to look at your model use
node.ls()
or
node.explore()