mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -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()) {
|
if (!ta->is_off()) {
|
||||||
Material *material = ta->get_material();
|
Material *material = ta->get_material();
|
||||||
if (material != (Material *)NULL) {
|
if (material != (Material *)NULL) {
|
||||||
|
if (glob.matches(material->get_name())) {
|
||||||
return material;
|
return material;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Now consider children.
|
// Now consider children.
|
||||||
PandaNode::Children cr = node->get_children();
|
PandaNode::Children cr = node->get_children();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user