window at mouse pointer

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 01 January 2011   #1
window at mouse pointer

hi all,

is it possible to create a window at mouse pointer?
 
Old 01 January 2011   #2
you can use the draggerContext command to get the mouse position, which you could then feed to the window -tlc flag to build a window at a specific point. However this only works on a viewport, so you wouldn't be able to do this wherever you liked (i.e. over another UI).

You can get more complex mouse info/functionality from the API via python though, but I can't tell you much about doing it that way...

:nathaN
 
Old 02 February 2011   #3
thanks NaughtyNathan

but that does'nt work.

correct me if i m wrong

i think there are two different spaces 1. screen space and 2. UI space

both r having different coordinates. context is working on screen & window is on UI

that is the reason i m not getting window at mouse position
 
Old 02 February 2011   #4
If you're relying on mel I cant help, but if you have no problem doing it with python - you just need to install 'xlib' package and than just use this:
source:
http://snipplr.com/view/19188/mouse...linux-via-xlib/
  1. from Xlib import X, display
  2. d = display.Display().screen().root.query_pointer()._d ata
  3. print "x="
  4. print d["root_x"]
  5. print "y="
  6. print d["root_y"]


oops, forgot to mention it's for linux only
__________________
..aut inveniam viam aut faciam..
::Copy SOP 4 Maya::
 
Old 02 February 2011   #5
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:29 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.