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 Tools Display Modes
  01 January 2011
window at mouse pointer

hi all,

is it possible to create a window at mouse pointer?
  01 January 2011
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...

  02 February 2011
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
  02 February 2011
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:
  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::
  02 February 2011
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
Society of Digital Artists

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

All times are GMT. The time now is 04:31 AM.

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