From c823dd27ae567bbf8023e1aac3a915cdb4b77c75 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 20 Feb 2011 15:35:53 +0000 Subject: [PATCH] fix bug #716509: NodePath.findMaterial does not work properly --- panda/src/pgraph/nodePath.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraph/nodePath.cxx b/panda/src/pgraph/nodePath.cxx index a05cd287da..4f923335cf 100644 --- a/panda/src/pgraph/nodePath.cxx +++ b/panda/src/pgraph/nodePath.cxx @@ -7878,7 +7878,9 @@ r_find_material(PandaNode *node, const RenderState *state, if (!ta->is_off()) { Material *material = ta->get_material(); if (material != (Material *)NULL) { - return material; + if (glob.matches(material->get_name())) { + return material; + } } } }