MotionBuilder Python Script12 -
2019-07-28 本文已影响10人
Houdinini
BAYEK
UI_FBMessageBox.gif
今天重新看了一下不能说的秘密,真好看!
今天我们来看一下MessageBox的实现方法
一、MessageBox
MessageBox即消息提示框
先来看一下MessageBox的 UI效果
UI_FBMessageBox.gif
这里内嵌了三个Box,展示了三种排版方式,来看一下代码:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2009 Autodesk, Inc. All rights reserved.
# Use of this software is subject to the terms of the Autodesk license agreement
# provided at the time of installation or download, or which otherwise accompanies
# this software in either electronic or hard copy form.
#
# Topic: FBMessageBox
#
from pyfbsdk import FBMessageBox
# Simple message box: just a OK button.
FBMessageBox( "TitleString First", "MessageString\nOnly one button:", "OK" )
# With 3 buttons this time.
FBMessageBox( "TitleString Second", "MessageString\nThree buttons:", "OK", "Maybe", "Cancel" )
# Now with a multiline string.
FBMessageBox( "TitleString Third", "MessageString\nOne\nTwo\nThree\nFour\nFive\nSix\nSeven", "OK" )
# Cleanup.
del( FBMessageBox )
代码很简单,照着敲一敲!decomposition and refactor!
二、结语
有什么问题可以留言!
继续!
共勉!