Thx Justin,
You are right, I thought of it.
But the thing is, i have a window in maya which will list the files and
file operation buttons (open,save,saveas) to user.
If user opens the scene files from the window then the title should update
else it should work normal.
On Thursday, November 8, 2012 1:16:44 AM UTC+5:30, Justin Israel wrote:
>
> 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]<javascript:>
> > 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