find objects by texture name raised a python error

This commit is contained in:
Campbell Barton 2008-09-06 12:50:22 +00:00
parent 742e917c6a
commit 1bd365e112

@ -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')