- Code: Select all
objAll = ix.api.OfObjectVector()
objType = ["TextureMapFile", "TextureStreamedMapFile"]
for i in objType:
ix.application.get_matching_objects(objAll, "./*", ix.application.get_working_context(), i)#
selObj = []
if len(objAll):
for obj in objAll:
tex_path = obj.get_attribute("filename").get_string()
file = tex_path.split("/")[-1]#
ext = file.split(".")[0]#
#print str(obj)
if str(ext) == "desert3":
selObj.append(str(obj))
if len(selObj):
print len(selObj)
ix.selection.select(ix.get_item(str(selObj)))
ix.selection.select(ix.get_item(str(selObj))) Report errors!