本文整理汇总了Python中maya.cmds.showHelp函数的典型用法代码示例。如果您正苦于以下问题:Python showHelp函数的具体用法?Python showHelp怎么用?Python showHelp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showHelp函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: SundayInstallPipelineCheckForUpdate
def SundayInstallPipelineCheckForUpdate(mode):
import SundaySetupPublicPy as SundaySetupPublicPy
reload(SundaySetupPublicPy)
import SundayDialogPy as SundayDialogPy
reload(SundayDialogPy)
fetchFile = tempfile.gettempdir() + os.sep + 'SundayInstallPipelinePublicPy.py'
try:
open(fetchFile, 'wb').write(urllib2.urlopen('http://3dg.dk/sundaypipeline/mayapublic/SundayInstallPipelinePublicPy.temp').read())
except:
if mode == 'active':
SundayDialogPy.SundayDialogConfirm('Error Fetching Pipeline From Online Repository ', 'Check Net Connection or Firewall Settings', 'OK')
else:
print 'Error Fetching Pipeline From Online Repository - Check Net Connection or Firewall Settings'
return None
onlineVersion = imp.load_source('module.name', fetchFile).SundayInstallPipelineVersion()
if onlineVersion > SundayInstallPipelineVersion():
updateResult = SundayDialogPy.SundayDialogPromptYesNoCancel('New Sunday Pipeline Version: ' + str(onlineVersion) + ' ', 'Update now?', ' CHANGE LOG ', 'YES', 'NO')
if updateResult == 'YES':
try:
SundaySetupPublicPy.SundaySetupSettingssUIClose()
except:
pass
imp.load_source('module.name', fetchFile).SundayInstallPipeline()
if updateResult == ' CHANGE LOG ':
cmds.showHelp('http://www.3dg.dk/2011/08/12/sunday-pipeline-maya-public/#changelog', absolute = True)
elif mode == 'active':
SundayDialogPy.SundayDialogConfirm('Sunday Pipeline Is Up To Date ', 'Current Version: ' + str(SundayInstallPipelineVersion()), 'OK')
else:
print 'Sunday Pipeline Is Up To Date. Current Version: ' + str(SundayInstallPipelineVersion())
开发者ID:elliottjames,项目名称:jeeves,代码行数:35,代码来源:SundayInstallPipelinePublicPy.py
示例2: mayaDocsLocation
def mayaDocsLocation(version=None):
docLocation = None
if (version == None or version == versions.installName() ) and mayaIsRunning():
# Return the doc location for the running version of maya
from maya.cmds import showHelp
docLocation = showHelp("", q=True, docs=True)
# Older implementations had no trailing slash, but the result returned by
# showHelp has a trailing slash... so eliminate any trailing slashes for
# consistency
while docLocation != "" and os.path.basename(docLocation) == "":
docLocation = os.path.dirname(docLocation)
# Want the docs for a different version, or maya isn't initialized yet
if not docLocation or not os.path.isdir(docLocation):
docLocation = getMayaLocation(version) # use original version
if docLocation is None and version is not None:
docLocation = getMayaLocation(None)
_logger.warning("Could not find an installed Maya for exact version %s, using first installed Maya location found in %s" % (version, docLocation) )
if version:
short_version = versions.parseVersionStr(version, extension=False)
else:
short_version = versions.shortName()
if platform.system() == 'Darwin':
docLocation = os.path.dirname(os.path.dirname(docLocation))
docLocation = os.path.join(docLocation , 'docs/Maya%s/en_US' % short_version)
return os.path.realpath(docLocation)
开发者ID:tbarbieri,项目名称:pymel,代码行数:30,代码来源:parsers.py
示例3: upToDateCheck
def upToDateCheck(revision, prompt=True):
'''
This is a check that can be run by scripts that import ml_utilities to make sure they
have the correct version.
'''
if not '__revision__' in locals():
return
if revision > __revision__:
if prompt and mc.optionVar(query='ml_utilities_revision') < revision:
result = mc.confirmDialog( title='Module Out of Date',
message='Your version of ml_utilities may be out of date for this tool. Without the latest file you may encounter errors.',
button=['Download Latest Revision','Ignore', "Don't Ask Again"],
defaultButton='Download Latest Revision', cancelButton='Ignore', dismissString='Ignore' )
if result == 'Download Latest Revision':
mc.showHelp('http://morganloomis.com/download/ml_utilities.py', absolute=True)
elif result == "Don't Ask Again":
mc.optionVar(intValue=('ml_utilities_revision', revision))
return False
return True
开发者ID:Bumpybox,项目名称:Tapp,代码行数:22,代码来源:ml_utilities.py
示例4: context_menu
def context_menu():
"""
Create context menu for output window.
"""
# context menu
output_win = cmds.cmdScrollFieldReporter(SCRIPT_OUTPUT_SCROLLFIELD, fst="")
cmds.popupMenu(parent=output_win)
cmds.menuItem(
label="Clear Output", command=lambda c: cmds.cmdScrollFieldReporter(output_win, e=True, clear=True)
)
# Echo all commands toggle
cmds.menuItem(
label="Toggle Echo Commands",
command=lambda c: cmds.commandEcho(state=not (cmds.commandEcho(q=True, state=True))),
)
# Go to python reference
cmds.menuItem(label="Python Command Reference", command=lambda c: cmds.showHelp("DocsPythonCommands"))
开发者ID:arubertoson,项目名称:maya-mamtools,代码行数:17,代码来源:display.py
示例5: script_output
def script_output(direction):
"""
Script output dock for layouts.
"""
dock_control = config['WINDOW_SCRIPT_OUTPUT_DOCK']
dock_window = config['WINDOW_SCRIPT_OUTPUT']
if cmds.dockControl(dock_control, ex=True):
return cmds.dockControl(dock_control, e=True, vis=True, fl=False)
if cmds.window(dock_window, ex=True):
main_win = dock_window
else:
main_win = cmds.window(dock_window, title='Output Window')
cmds.paneLayout(parent=main_win)
# context menu
output_win = cmds.cmdScrollFieldReporter(fst="")
cmds.popupMenu(parent=output_win)
cmds.menuItem(
label='Clear Output',
command=lambda c: cmds.cmdScrollFieldReporter(
output_win, e=True, clear=True),
)
# Echo all commands toggle
cmds.menuItem(
label='Toggle Echo Commands',
command=lambda c: cmds.commandEcho(
state=not(cmds.commandEcho(q=True, state=True))),
)
# Go to python reference
cmds.menuItem(
label='Python Command Reference',
command=lambda c: cmds.showHelp('DocsPythonCommands'),
)
cmds.dockControl(
dock_control,
content=main_win,
label='Output Window',
area=direction,
height=500,
floating=False,
allowedArea=['left', 'right']
)
开发者ID:arubertoson,项目名称:maya-mamprefs,代码行数:45,代码来源:_layout_docks.py
示例6: myHelp
def myHelp():
cmds.showHelp("Commands/showHelp.html", docs=True)
开发者ID:mfossett,项目名称:PythonScripts,代码行数:2,代码来源:BB_Toolset_v1.py
示例7: main
__category__ = 'animationScripts'
__revision__ = 1
import maya.cmds as mc
try:
import ml_utilities as utl
utl.upToDateCheck(22)
except ImportError:
result = mc.confirmDialog( title='Module Not Found',
message='This tool requires the ml_utilities module. Once downloaded you will need to restart Maya.',
button=['Download Module','Cancel'],
defaultButton='Cancel', cancelButton='Cancel', dismissString='Cancel' )
if result == 'Download Module':
mc.showHelp('http://morganloomis.com/download/animationScripts/ml_utilities.py',absolute=True)
def main():
sel = mc.ls(sl=True)
if not sel:
raise RuntimeError('Please select an object.')
if [x for x in sel if not mc.attributeQuery('translate', exists=True, node=x)]:
raise RuntimeError('Only works on transform nodes, please adjust your selection.')
frameRate = utl.getFrameRate()
timeFactor = 1.0/frameRate
开发者ID:Italic-,项目名称:maya-prefs,代码行数:30,代码来源:ml_ballisticAnimation.py
示例8: main
__revision__ = 6
import maya.cmds as mc
import maya.mel as mm
try:
import ml_utilities as utl
utl.upToDateCheck(8)
except ImportError:
result = mc.confirmDialog( title='Module Not Found',
message='This tool requires the ml_utilities module. Once downloaded you will need to restart Maya.',
button=['Download Module','Cancel'],
defaultButton='Cancel', cancelButton='Cancel', dismissString='Cancel' )
if result == 'Download Module':
mc.showHelp('http://morganloomis.com/download/ml_utilities.py',absolute=True)
def main(selectedChannels=True, transformsOnly=False):
'''
Resets selected channels in the channel box to default, or if nothing's
selected, resets all keyable channels to default.
'''
gChannelBoxName = mm.eval('$temp=$gChannelBoxName')
sel = mc.ls(sl=True)
if not sel:
return
chans = None
if selectedChannels:
chans = mc.channelBox(gChannelBoxName, query=True, sma=True)
开发者ID:GuidoPollini,项目名称:MuTools,代码行数:31,代码来源:ml_resetChannels.py
示例9: main
def main():
'''
This just launches the online help and serves as a placeholder for the default function for this script.
'''
mc.showHelp(wikiURL+'#ml_utilities', absolute=True)
开发者ID:Bumpybox,项目名称:Tapp,代码行数:5,代码来源:ml_utilities.py
示例10: ui
from functools import partial
import maya.cmds as mc
from maya import OpenMaya
try:
import ml_utilities as utl
utl.upToDateCheck(32)
except ImportError:
result = mc.confirmDialog( title='Module Not Found',
message='This tool requires the ml_utilities module. Once downloaded you will need to restart Maya.',
button=['Download Module','Cancel'],
defaultButton='Cancel', cancelButton='Cancel', dismissString='Cancel' )
if result == 'Download Module':
mc.showHelp('http://morganloomis.com/tool/ml_utilities/',absolute=True)
def ui():
'''
User interface for world bake
'''
with utl.MlUi('ml_worldBake', 'World Bake', width=400, height=175, info='''Select objects, bake to locators in world, camera, or custom space.
When you're ready to bake back, select locators
and bake "from locators" to re-apply your animation.''') as win:
mc.checkBoxGrp('ml_worldBake_bakeOnOnes_checkBox',label='Bake on Ones',
annotation='Bake every frame. If deselected, the tool will preserve keytimes.')
tabs = mc.tabLayout()
tab1 = mc.columnLayout(adj=True)
开发者ID:liudger,项目名称:ml_tools,代码行数:30,代码来源:ml_worldBake.py
示例11: ui
__revision__ = 4
import maya.cmds as mc
import maya.mel as mm
from maya import OpenMaya
import random
try:
import euclid
except ImportError:
result = mc.confirmDialog( title='Module Not Found',
message='This tool requires the euclid module, which can be downloaded for free from the internet. Once downloaded you will need to restart Maya.',
button=['Go To Website','Cancel'],
defaultButton='Cancel', cancelButton='Cancel', dismissString='Cancel' )
if result != 'Cancel':
mc.showHelp('http://partiallydisassembled.net/euclid.html',absolute=True)
try:
import ml_utilities as utl
utl.upToDateCheck(9)
except ImportError:
result = mc.confirmDialog( title='Module Not Found',
message='This tool requires the ml_utilities module. Once downloaded you will need to restart Maya.',
button=['Download Module','Cancel'],
defaultButton='Cancel', cancelButton='Cancel', dismissString='Cancel' )
if result == 'Download Module':
mc.showHelp('http://morganloomis.com/download/animationScripts/ml_utilities.py',absolute=True)
def ui():
开发者ID:Italic-,项目名称:maya-prefs,代码行数:31,代码来源:ml_arcTracer.py
示例12: SundayPlusSaveWrongFileConvention
def SundayPlusSaveWrongFileConvention():
plusSaveHelpDialog = SundayDialogPy.SundayDialogPromptYesNo('Error ', 'Scene is not the right file convention: Name_###_Author.mb', 'OK', 'HELP')
if plusSaveHelpDialog == 'HELP':
cmds.showHelp('http://www.3dg.dk/2011/12/07/sunday-pipeline-plus-save/', absolute = True)
开发者ID:elliottjames,项目名称:jeeves,代码行数:4,代码来源:SundayPlusSavePy.py
示例13: googleSearch
def googleSearch( item ):
google = r'http://www.google.com/search?sourceid=chrome&ie=UTF-8&q='
cmds.showHelp( google + item, absolute=True )
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:3,代码来源:lecture11.py
示例14: myHelp
def myHelp():
cmds.showHelp( 'Commands/showHelp.html', docs=True )
开发者ID:mfossett,项目名称:PythonScripts,代码行数:2,代码来源:M_Fossett_Final_v2.py
示例15: SundayGeometryCacheShowHelp
def SundayGeometryCacheShowHelp():
cmds.showHelp('http://www.3dg.dk/2011/12/07/sunday-pipeline-maya-geometry-cache/', absolute = True)
开发者ID:elliottjames,项目名称:jeeves,代码行数:2,代码来源:SundayGeometryCachePy.py
示例16: EngineGrid
def EngineGrid():
version = " v1.1"
title = "EngineGrid"
# colors
frameBGC = [0.17, 0.30, 0.30]
unityBGC = [0.25, 0.25, 0.35]
udkBGC = [0.35, 0.25, 0.25]
cryengineBGC = [0.25, 0.35, 0.25]
mayaBGC = [0.33, 0.33, 0.33]
# kills open instance of window
if cmds.window("EngineGrid", exists=True):
cmds.deleteUI("EngineGrid")
# creates window and assigns title
cmds.window("EngineGrid", title=title + version, iconName=title + version, menuBar=False, minimizeButton=False, maximizeButton=False, sizeable=False)
# overall parent frame that holds all children
cmds.columnLayout("gridSettingsColumn", columnWidth=261)
cmds.separator(style="in")
# frame around all buttons with instruction to set grid. is collapsible in Maya 2013 despite flag set to false
cmds.frameLayout('gridButtonsColumn', label="select your grid", collapsable=False, backgroundColor=frameBGC, collapse=False, borderStyle="etchedIn", width=261, marginHeight=1, parent="gridSettingsColumn")
# grid selection buttons
cmds.rowColumnLayout(numberOfColumns=4, columnWidth=[(1, 64), (2, 64), (3, 64), (4, 64)], parent="gridButtonsColumn")
# changeGridSettings(set, size, spacing, divisions, nearClipPlane, farClipPlane, gridAxisColor, gridHighlightColor, gridColor, trans)
cmds.button(h=64, label="Unity", bgc=unityBGC, c=lambda z: changeGridSettings("unity", 150, 10, 1, 0.1, 100000.0, 1, 3, 2, 10000.0))
cmds.button(h=64, label="UDK", bgc=udkBGC, c=lambda z: changeGridSettings("udk", 512, 16, 1, 0.1, 100000.0, 1, 3, 2, 10000.0))
cmds.button(h=64, label="CryEngine", bgc=cryengineBGC, c=lambda z: changeGridSettings("cryengine", 150, 10, 1, 0.1, 100000.0, 1, 3, 2, 10000.0))
cmds.button(h=64, label="Maya", bgc=mayaBGC, c=lambda z: changeGridSettings("maya", 12, 5, 5, 0.1, 10000.0, 1, 3, 3, 100.1))
# grid square division text
cmds.rowColumnLayout('unityDivUnits', visible=False, numberOfColumns=3, columnWidth=[(1, 125), (2, 28), (3, 60)], parent="gridButtonsColumn")
cmds.text(align="left", label=" 1 grid square is ")
cmds.intField('unityMultiplier', min=0, value=100)
cmds.text(label=" centimeters")
cmds.rowColumnLayout('udkDivUnits', visible=False, numberOfColumns=3, columnWidth=[(1, 140), (2, 20), (3, 30)], parent="gridButtonsColumn")
cmds.text(align="left", label=" 1 grid square is ")
cmds.intField('udkMultiplier', min=0, value=16)
cmds.text(label=" units")
cmds.rowColumnLayout('cryengineDivUnits', visible=False, numberOfColumns=3, columnWidth=[(1, 125), (2, 28), (3, 60)], parent="gridButtonsColumn")
cmds.text(align="left", label=" 1 grid square is ")
cmds.intField('cryengineMultiplier', min=0, value=100)
cmds.text(label=" centimeters")
# grid division buttons
cmds.rowColumnLayout('unityDivButtons', visible=False, numberOfColumns=5, columnWidth=[(1, 51), (2, 51), (3, 52), (4, 51), (5, 51)], parent="gridButtonsColumn")
cmds.button(h=32, label="1cm", bgc=unityBGC, command=lambda z: setGridDivisions(100, 1))
cmds.button(h=32, label="10cm", bgc=unityBGC, command=lambda z: setGridDivisions(10, 10))
cmds.button(h=32, label="25cm", bgc=unityBGC, command=lambda z: setGridDivisions(4, 25))
cmds.button(h=32, label="50cm", bgc=unityBGC, command=lambda z: setGridDivisions(2, 50))
cmds.button(h=32, label="100cm", bgc=unityBGC, command=lambda z: setGridDivisions(1, 100))
cmds.rowColumnLayout('udkDivButtons', visible=False, numberOfColumns=5, columnWidth=[(1, 51), (2, 51), (3, 52), (4, 51), (5, 51)], parent="gridButtonsColumn")
cmds.button(h=32, label="1", bgc=udkBGC, command=lambda z: setGridDivisions(16, 1))
cmds.button(h=32, label="2", bgc=udkBGC, command=lambda z: setGridDivisions(8, 2))
cmds.button(h=32, label="4", bgc=udkBGC, command=lambda z: setGridDivisions(4, 4))
cmds.button(h=32, label="8", bgc=udkBGC, command=lambda z: setGridDivisions(2, 8))
cmds.button(h=32, label="16", bgc=udkBGC, command=lambda z: setGridDivisions(1, 16))
cmds.rowColumnLayout('cryengineDivButtons', visible=False, numberOfColumns=5, columnWidth=[(1, 51), (2, 51), (3, 52), (4, 51), (5, 51)], parent="gridButtonsColumn")
cmds.button(h=32, label="1cm", bgc=cryengineBGC, command=lambda z: setGridDivisions(100, 1))
cmds.button(h=32, label="10cm", bgc=cryengineBGC, command=lambda z: setGridDivisions(10, 10))
cmds.button(h=32, label="25cm", bgc=cryengineBGC, command=lambda z: setGridDivisions(4, 25))
cmds.button(h=32, label="50cm", bgc=cryengineBGC, command=lambda z: setGridDivisions(2, 50))
cmds.button(h=32, label="100cm", bgc=cryengineBGC, command=lambda z: setGridDivisions(1, 100))
# grid grow/shrink and "about" buttons
cmds.rowColumnLayout(numberOfColumns=3, columnWidth=[(1, 85), (2, 86), (3, 85)], p="gridButtonsColumn")
cmds.button(h=20, label="grow", bgc=frameBGC, command=lambda z: gridSizeChange("up", 50))
cmds.button(h=20, label="shrink", bgc=frameBGC, command=lambda z: gridSizeChange("down", 50))
cmds.button(h=20, label="about", bgc=frameBGC, command=lambda z: cmds.showHelp('http://krellgames.com/tools.html', absolute=True))
# prints version and author info to the command line
consolePrint((title + version), " by Krell of krellgames.com")
# draws the main window
cmds.showWindow()
cmds.window("EngineGrid", e=True, resizeToFitChildren=True, sizeable=True, height=190, width=261)
cmds.frameLayout('gridButtonsColumn', edit=True, cc=lambda *args: editWinSize('EngineGrid', 'gridButtonsColumn'))
开发者ID:KrellTheHuman,项目名称:EngineGrid,代码行数:84,代码来源:EngineGrid.py
示例17: len
_html += '</br>'
_html += _cam
if _renderable == 0:
_html += _tagS[0]
_html += 'WARNING: no renderable cameras'
_html += _tagS[1]
_html += '</dd>'
# references
_refs = cmds.file (query = True, reference = True)
if len (_refs) > 0:
_html += '</br> referenced scripts: </br>'
for _ref in _refs:
_html += _tag[0] + ' ................... ' \
+ _ref + _tag[1]
# write and open html
if len( _attrib) > 0:
_fileName = _scene.path + _scene.name + '__scriptInfo.html'
_infoFile = open (_fileName, 'w')
_infoFile.write (_html)
_infoFile.close ()
cmds.showHelp (_fileName, absolute = True)
else:
mm.eval ('warning "trouble...";')
开发者ID:danielforgacs,项目名称:code-dump,代码行数:31,代码来源:old_scriptInfo(2).py
注:本文中的maya.cmds.showHelp函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论