windowPref command doesn't change window width, but says it does


#1

I’m trying to set the width of a non-main Maya window (hypergraph, etc.).

But the command doesn’t actually move it. It returns that it does…which is really weird. Anyone know what’s up?

    openWindows = cmds.lsUI(windows=True)
    
    for i, window in enumerate(openWindows):
        if window != "MayaWindow":
            
            widthQueryPre = cmds.windowPref(window, q=True, w=True)
            
            cmds.windowPref(window, e=True, w=200) # Why doesn't this change the window's width?
            
            widthQueryPost = cmds.windowPref(window, q=True, w=True)
            
            print i, window, widthQueryPre, widthQueryPost