mirror of
https://github.com/ApfelTeeSaft/vb01.git
synced 2026-08-27 03:43:42 +00:00
returning node descendant by name
This commit is contained in:
@@ -422,6 +422,21 @@ namespace vb01{
|
||||
return origin;
|
||||
}
|
||||
|
||||
Node* Node::findDescendant(string name, bool allDescendants){
|
||||
vector<Node*> descendants = children;
|
||||
|
||||
if(allDescendants){
|
||||
descendants.clear();
|
||||
getDescendants(descendants);
|
||||
}
|
||||
|
||||
for(Node *desc : descendants)
|
||||
if(desc->getName() == name)
|
||||
return desc;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Node::updateShaders(){
|
||||
Root *root = Root::getSingleton();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user