forked from bartvdbraak/blender
find objects by texture name raised a python error
This commit is contained in:
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')
|
||||
|
Loading…
Reference in New Issue
Block a user