I am trying to make a function that saves the file and shows the alarm on the bottom of the window. Everything works well except the text doesn’t work as I expected because the text shows once in the correct spot and shows on Maya interface that doesn’t go away.
def exportFBXFunction(): #get FBX export save finalpath = cmds.textFieldGrp('filepath', q = True, text = True) #query = question, text = answer or value #delete exist column if (cmds.columnLayout('messageColumn', exists = True)): #delete column if exist cmds.deleteUI('messageColumn', control = True) if(cmds.text('message', exists = True)): cmds.deleteUI('message', control = True) messageColumn = cmds.columnLayout( adjustableColumn = True ) message = cmds.text('message') #save files if finalpath != '' and cmds.ls( selection = True ): original = cmds.getAttr('.translate') cmds.move( 0, 0, 0, cmds.ls( selection = True )) pm.mel.FBXExport( f= finalpath ) cmds.move( original, original, original, cmds.ls( selection = True )) message = cmds.text('message', label = 'Save Completed.', align = 'center', backgroundColor = [0,0,1], edit = True) else: message = cmds.text('message', label = 'Save Failed. Please check if the mesh is selected and the filepath is correct.', align = 'center', backgroundColor = [1,0,0], edit = True)
I thought it is gonna be solved quickly and I tried a bunch of ways to solve this problem, but it hasn’t fixed yet. Is there a way that I can show the text on the window, not the outside of the window?