mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
fix bug #716509: NodePath.findMaterial does not work properly
This commit is contained in:
parent
8c51f16e78
commit
c823dd27ae
@ -7878,12 +7878,14 @@ r_find_material(PandaNode *node, const RenderState *state,
|
||||
if (!ta->is_off()) {
|
||||
Material *material = ta->get_material();
|
||||
if (material != (Material *)NULL) {
|
||||
if (glob.matches(material->get_name())) {
|
||||
return material;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now consider children.
|
||||
PandaNode::Children cr = node->get_children();
|
||||
|
Loading…
x
Reference in New Issue
Block a user