Here is a bare bones example, this code targets the individual pages of
maya command docs for both python and mel if they are available. Otherwise
it will open up the index so you can quickly search.
import os
import sys
import webbrowser
from org.gjt.sp.jedit import Macros
text = (textArea.getSelectedText())
filePath = view.getBuffer().getPath()
extension = os.path.splitext(filePath)[-1]
if extension == '.mel' or extension == '.py':
if extension == '.mel':
partialPath =
'/usr/autodesk/maya2008-x64/docs/Maya2008/en_US/Commands/'
else:
partialPath =
'/usr/autodesk/maya2008-x64/docs/Maya2008/en_US/CommandsPython/'
if not text or not os.path.isfile('%s/%s.html' % (partialPath,text)):
text = 'index'
fullPath = os.path.join(partialPath, '%s.html'%(text))
webbrowser.open_new_tab(fullPath)
Email may throw the formatting off, take some time to play around and
expand on it.(perhaps using the infoViewer) As I said, its a very simple
example of what you can do.
Good Luck.
> Thanks Shaun:
> I haven't done any python programming outside of Maya, could I ask for
> the real code to pull this off?
> Also, I prefer to display the results in the infoViewer. I keep the
> Maya Help/Commands open in a browser, but I find the quick access to
> individual commands very helpful.
>
> --
> http://groups.google.com/group/python_inside_maya
>
--
Shaun Friedberg
04-902-0443
http://www.pyrokinesis.co.nz
"Fire Is Fun, When You Think About It"
--
http://groups.google.com/group/python_inside_maya