View Full Version : Update Window B's position - when window A is dragged !
11-24-2006, 09:48 AM
ok after much searching i had to ask your help..:shrug:
i have one window i'm creating (contains a scroll list and 2 buttons).... i pop this window to match exactly an icon text button, sitting in my graph editor.
to get this, i'm querying the -topLeftCorner values of the graph editor and then place my window corresponding to that.. all is fine.
but when i drag my graph editor to any other position, i want to update my window's position to match the required place...... can i do this ?
can we attach a call back to a 'window' ? i know for UI controls, we can.. or is there an event (drag window) which can fire a scriptjob or something , to update my window's positions ? now i can try to put the scroll list and buttons into the graph editor's UI..but thats making the other controls go off ! :rolleyes:
or is there a simpler way for all this ? anything, just throw, i'll bask under ur answers !
-cheers and thanx ,
don't think there is such an event, but the whole idea is kinda messy... why not copy the graph editor script to your scripts dir and modify it directly? :)
11-24-2006, 11:07 AM
thanx for the answer...well, the idea is to keep the graph editor simple yet add it with required tools....which can be accessed on demand.
i already have the graph editor's UI tweaked where by i have few buttons extra in my graph editor. but i dont want to use much real estate, cluttering the top UI..so if i can achieve this, my on demand window can show up stuff, quickly yet not clutter the graph editor's UI..
right now i have text scroll list which needs to display atleast 6 rows.. now thats too much space if put into the graph editor itself..
oh ok, but still, i don't think there is a 'window moved' event in maya.
your best tip is to think how you could edit the graph editor but in the same time to keep it easy and nice to work with. Minimiseble/Hideble stuff is what you'll end doing most of the times...
so, one thing you could do, to not clutter the UI more, is to add another "split frame" to the outliner panel on the left (you need to create your own frameLayout else you'll end up having your own UI in the standalone outliner window aswell :D). That outliner is allready split in two panes stacked on top (with just the first panel shown by default) and you could split it in 3 and put your own UI in the third panel and minimise it (by dragging the separator) when you wish.
hope it helps :)
11-24-2006, 02:15 PM
thanx a ton ! yup, your idea is gud ! will work on it..
That outliner is allready split in two panes stacked on top ....
r u pointing to the rowColumnLayout being used to dock the outlinerED ?? i need some push in this regard....
thanx a ton (second ton !) :D
didn't test it much, but it seems to be ok at a first sight :)
search the file with the "#ya" string to find the place where you should put your own UI ;)
11-25-2006, 01:44 AM
ashishdantu: I got your email but noticed that you also asked your question here. I'm pretty sure that there is no way to "attach" two windows together so that they move as one...also I'm pretty sure that there is no "window moved" message that you can get callbacks for. Closest thing is that you can get messages for when someone minimizes/maximizes a window.
As you have read here, I think the only way you can get what you want is to:
a) Write a proc which moves your window up against the graph editor, assign it to a hotkey, and then everytime you reposition the graph editor you hit the hotkey at it reattaches the other window to it.
b) Hack around with the graphEditor mel file.
c) There is a graph editor UI control so you could write your own Graph Editor from scratch if you wanted to.
I'd go with (b) personally...although the graphEditor MEL is a little difficult to follow in places. I haven't looked at what yahsu attached though...I assume that's what you did?
11-25-2006, 04:38 AM
hi yashu / tim,
Yashu : yooohhhhwwwoooww !! :bowdown: you sure do know ur stuff !! i can c u've hacked every bit of the entire graph editor code !! :D ........... ur animators must be kissing every bit of u !?! and thanx a 3rd ton , for the help > #ya ! .... i found it and will work on it.. this is great ...... thanx for showing me light at the beginning of the tunnel !
thank you too for the response... and i will follow ur suggestion > option (b) ! yashu has helped me with that ..
i'll post back what i've come up with ! ehhooww ! :scream:
11-28-2006, 05:15 AM
with the help of ur script, i got an idea how and where u can insert ur own ui... but i wanted to have my UI show up at the top of the filterField thingy...
so i created frameLayout with my UI under the formLayout where the filterfield and outliner and increase / decrease width buttons sit..
then i collapse my framelayout on need basis..and it works a charm.... :)
now i have a peculiar problem.. kinda related to this.. say now i have my 'HACKED-GEditor' script, which is actually a separate mel file...it actually fires the default GE and then edits it to add my UI and other stuff to it....
i need to run this on several machines at once. i can set this, like so , using the usersetup.mel... ok, the prob is > when the users click on thier dear 'graphEditor' shelves or menu items or hotkeys etc..... i need to make my script fire so that their GE will be appended with my extra tools.... everytime...
to do so, i thought of modifying the runtimecommand 'grapheditor' to fire my function ["myHackedGE()"] instead of the regular "tearpanel ...ge..ge.." thingy...; > now this wud fail as this is a default run time command, which maya says i cant modify..
but guess what,,, they shud be also given a way to revert back to the default GE, if need be... so any idea of how i can pin this down ?
thanx in advance...
if you place the script in your user scripts dir then maya should use it instead of the initial Alias version from the Program Files/Alias/Maya8.0/scripts/others. So no userSetup or further adjustments are needed, just copy the modified script to the scripts dir of every user :)
going to school now, i hope i didnt rush the above too much :D
Haider of Sweden
11-28-2006, 03:16 PM
Hey Ash, dont forget to release your script later then, huh?
I am very excited to see what can be done.
11-28-2006, 03:16 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.