diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-09-06 16:50:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-09-06 16:50:22 +0400 |
commit | 1bd365e1121e85761eb30312987f4aad5c2601ce (patch) | |
tree | a7898c57eadf3164e87281a835369e53fa3188a4 /release | |
parent | 742e917c6acd4c7a4fbbc438607df6b9b5401602 (diff) |
find objects by texture name raised a python error
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/object_find.py | 12 |
1 files 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') |