A scriptJob would let you hook into those events. The callback can do
whatever you want.
You can do it with either Maya commands, or with PyQt4:

## PyQt4/Maya commands solution ##
from PyQt4 import QtGui
import sip

import maya.cmds as cmds
#import maya.mel as mm

import maya.OpenMayaUI as mui

mainWin = sip.wrapinstance(long(mui.MQtUtil.mainWindow()), QtGui.QWidget)
#mainWin = mm.eval("$tmpVar=$gMainWindow")

def sceneSaved(*args):
    scene = cmds.file(q=True, sn=True)
    mainWin.setWindowTitle('PBL - %s' % scene)
    #cmds.window(mainWin, e=True, t='PBL - %s' % scene)

jobId = cmds.scriptJob(e=['SceneSaved', sceneSaved])

####



-- justin


On Wed, Nov 7, 2012 at 11:11 AM, PBLN RAO <[email protected]> wrote:

> Hi all,
>
> I want to know a process to change the Maya title text.
>
> Ie., when a file is opned we see the complete path in the titlebar.
> Instead i want to have my own message with the current file-name to be
> displayed.
>
> I could able to to it with a seperate command, but when linking it to
> save,saveas,open commands then those commands are over-riding my code and
> its displaying the full path as usual.
>
> EX:
>
> if the opned file path is c:\test\asd.ma
>
> I want it to look something thing like "PBL - asd.ma"
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to