Wednesday, 21 September 2011

Python : reName selected objects in mobu

from pyfbsdk import*
lModelList = FBModelList()
FBGetSelectedModels( lModelList )
lcropL= 1
lcropR= 1
#lPatten=""
#lNewName=""
if len( lModelList ) == 0:
    FBMessageBox( "Message", "Nothing selected", "OK", None, None )
else:
    modifiedmodels = []
    for model in lModelList:
        print model.Name[lcropL:-lcropR]
        #model.Name = model.Name[lcropL:]
        #model.Name = model.Name[:-lcropR]
        #model.Name = model.Name.replace( lPatten, lNewName )

No comments: