Original Post by: maruthi Tue Sep 30 06:28:44 2014
Hi All,
I wrote script for find the Repeated Textures in DB, It will help to find the Repeated Texture and replace with corresponding Polygon and finally it will Remove Repeated Texture. I hope it is useful to reduce unwanted load to DB
Thanks,
Maruthi
db =mgGetCurrentDb()
class indent:
pass
i =indent()
i.list =[]
i.list1 =[]
i.indexmain=-1
i.indexreplace=-1
def listTextures():
bool,index,name = mgGetFirstTexture(db)
while bool:
i.list.append(name)
i.list1.append(index)
bool,index,name = mgGetNextTexture(db)
def BeadWalk (db, parent, rec, userData):
if mgGetCode (rec) == fltPolygon:
localList = mgGetAttList(rec,fltPolyTexture)
if localList[2] ==i.indexreplace:
mgSetAttList(rec,fltPolyTexture,i.indexmain)
return MG_TRUE
def findTextures():
listTextures()
for x in range(len(i.list)):
for s in range(x+1,len(i.list)):
if i.list[x] == i.list[s]:
if mgIsTextureInPalette(db,i.list[x]) and mgIsTextureInPalette(db,i.list[s]):
Craig
Hi All,
I wrote script for find the Repeated Textures in DB, It will help to find the Repeated Texture and replace with corresponding Polygon and finally it will Remove Repeated Texture. I hope it is useful to reduce unwanted load to DB
Thanks,
Maruthi
1 person has this problem