def threeButtonLayout(mainForm, windowName, cmd_create):
	"""
	Create the standard three button layout used in Maya tools: Create, Apply, and Close.
	@param mainForm The main form of the options window
	@param windowName The name of the options window
	@param cmd_create The command to execute when the Create or Apply button is pressed.
	"""
	cmd_closeWindow = '%s.deleteUI("%s")' % (am.__kCmdsGlobalName__, windowName) # this command is called outside the module, so cmds must exist in the Maya session
	# create the buttons
	btn_create = cmds.button(h=26, label='Create', command='%s\n%s'%(cmd_create, cmd_closeWindow))
	btn_apply = cmds.button(h=26, label='Apply', command=cmd_create)
	btn_close = cmds.button(h=26, label='Close', command=cmd_closeWindow)
	# position the buttons
	cmds.formLayout(mainForm, edit=True, attachForm=[(btn_create, 'left', 5), (btn_create, 'bottom', 5)], attachPosition=[(btn_create, 'right', 1, 33)], attachNone=[(btn_create, 'top')])
	cmds.formLayout(mainForm, edit=True, attachForm=[(btn_apply, 'bottom', 5)], attachPosition=[(btn_apply, 'left', 3, 33), (btn_apply, 'right', 3, 67)], attachNone=[(btn_apply, 'top')])
	cmds.formLayout(mainForm, edit=True, attachForm=[(btn_close, 'right', 5), (btn_close, 'bottom', 5)], attachPosition=[(btn_close, 'left', 1, 67)], attachNone=[(btn_apply, 'top')])
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/amTools/utilities/ui.py/threeButtonLayout/original