View Full Version : how to make an object appear always on top of everything in the scene
gatesofmaya 08-20-2009, 05:58 PM hi...i'm trying to make a controller object appear on top of everything in the scene just like the manipulator handle appears on top of everything in maya but can't seem to find a way. does somebody know how to do that...?
|
|
GeoffClark
08-20-2009, 07:50 PM
Myself, I know of no way to do that.
Is this because you are accidentally selecting objects that you don't wish to?
For instance, selecting geometry when you need to grab NURBS or joints?
The selection mask at the top of the screen can help. Turn off categories of objects, and they will not be selected in the view.
Hope this helps.
gatesofmaya
08-22-2009, 02:29 AM
thanks for the info GeoffClark....its not because of selection problem...i was jus trying to setup controllers in different way and was wondering if there's a way to do it...the controllers need to be inside the mesh and remain visible all the time just like the manipulator...
scroll-lock
09-01-2009, 09:45 AM
something like that ?
http://scroll-lock.eu/index.php?option=com_content&view=article&id=168:custom-controls&catid=1:scroll-blog#JOSC_TOP
gatesofmaya
09-01-2009, 03:57 PM
yes..thanks for the info Marin! that's what i've been trying to do...! i was thinking of how to make its visibility and appearance properties exactly like that of manipulator handle - always appearing on top of evreything...but what you've done is actually even better...controllable color, transparency and backAlpha...all that make the controllers easy to distinguish their location and purpose - thus making their usage much more intuitive...don't know anything about how to make OpenGL function calls and advanced stuffs like that though...will try my best...can you please give some more info on how to achieve this...
Thanks!
scroll-lock
09-02-2009, 08:19 AM
Here is the repository of the locators code:
http://github.com/scroll/locators/tree/master
Check the locators.py.
What you need to dig is the draw method of every locator. Actually just pick one. The hack is to draw the object after everything else in the scene. That way, OpenGL makes it appear as it is on top of every other object. The OpenGL code for that is very simple actually.
glFT.glDepthFunc(OpenMayaRender.MGL_GREATER)
# Here is the code, that draws what you need.
# And it appears on top of everything
Here you pass the GL_GREATER method ( this is how you say OpenGL to draw
the stuff last). Google for that particular code and how to
incorporate it.
gatesofmaya
09-03-2009, 12:28 AM
Thanks a lot for sharing the code and info! will take some time before i get this stuff into my head and get it workin...
CGTalk Moderation
09-03-2009, 12:28 AM
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-2012, Jelsoft Enterprises Ltd.