From 1bd365e1121e85761eb30312987f4aad5c2601ce Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 6 Sep 2008 12:50:22 +0000 Subject: [PATCH] find objects by texture name raised a python error --- release/scripts/object_find.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/release/scripts/object_find.py b/release/scripts/object_find.py index 0cfd6ad1d92..8332eab84fb 100644 --- a/release/scripts/object_find.py +++ b/release/scripts/object_find.py @@ -195,11 +195,13 @@ def main(): activate(ob, scn) return if NAME_TEXTURE: - for tex in mat.getTextures(): - if tex: - if name_cmp(NAME_MATERIAL, tex.name): - activate(ob, scn) - return + for mtex in mat.getTextures(): + if mtex: + tex = mtex.tex + if tex: + if name_cmp(NAME_TEXTURE, tex.name): + activate(ob, scn) + return Draw.PupMenu('No Objects Found')