def about():
"""Displays the CMT About dialog."""
name = 'cmt_about'
if cmds.window(name, exists=True):
cmds.deleteUI(name, window=True)
if cmds.windowPref(name, exists=True):
cmds.windowPref(name, remove=True)
window = cmds.window(name, title='About CMT', widthHeight=(600, 500), sizeable=False)
form = cmds.formLayout(nd=100)
text = cmds.scrollField(editable=False, wordWrap=True, text=cmt.__doc__.strip())
button = cmds.button(label='Documentation', command='import cmt.menu; cmt.menu.documentation()')
margin = 8
cmds.formLayout(form, e=True,
attachForm=(
(text, 'top', margin),
(text, 'right', margin),
(text, 'left', margin),
(text, 'bottom', 40),
(button, 'right', margin),
(button, 'left', margin),
(button, 'bottom', margin),
),
attachControl=(
(button, 'top', 2, text)
))
cmds.showWindow(window)
评论列表
文章目录