Browse Source

fix bug #716509: NodePath.findMaterial does not work properly

rdb 15 years ago
parent
commit
c823dd27ae
1 changed files with 3 additions and 1 deletions
  1. 3 1
      panda/src/pgraph/nodePath.cxx

+ 3 - 1
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;
+            }
           }
         }
       }