Hi Xiyu

  I'm not fully sure what it is you are trying to do but if it helps I 
think what I think you are describing is doable, just forget about the 
MFnMesh approach as what you are after is a user display plugin, rather 
than a mesh influencing plugin so to say.
  I don't have access to Maya right now but the settings for vertex sizes 
are in Display --> polygons --> Set vertex size.


Three ways to go about this that I can think of quickly, don't have any 
examples but hope this gets you started:
a)
  Since the setting is there, then there is definitely a configuration file 
somewhere on your hard drive where the vertex size setting you save is 
stored.  This may be a global setting ( just one size per Maya instance ) 
but if you are in luck then this draw setting is per camera, you can build 
yourself a layered persp camera which displays a matrix part of your 
workspace per size settings { 3 different size settings in your plugin == 3 
cameras baked into one, each displaying the vertex size you set that part 
of the geometry to }
b)
  You tap into the actual workspace 2.0 API, look around for anything 
that's per vertex and see if you can simply add a scaling effect of sorts. 
 Instancing using Alembic, Assemblies, and Workspace 2.0 shows amazing real 
time response times.  If all you are after is an enhanced wireframe mode 
rather than a full blown real time shaded environment then create a plugin 
that picks up whenever you are in wireframe mode and slap a literal lambert 
shaded polyCube on each vertex.  The effort for Workspace 2.0 to render 
wireframe is so minimal you can get away with adding actual geometry to 
help with the visual side without everything turning sluggish.
c)
  Write a shader that does the trick, all shaders, even the simplest ones, 
have the core functionality of doing things to geometry per vertex.  Again 
here this would be drawing additional squares on top of your geometry while 
retaining performance speeds but at the end of the day you should get the 
same effect.

  Hope this ramble helps and you manage to get your plugin working, please 
share if you do!

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/1640b642-fa80-46d8-aba3-c9cd7d3a6535%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to