美文网首页工具癖
MotionBuilder Python Script12 -

MotionBuilder Python Script12 -

作者: Houdinini | 来源:发表于2019-07-28 16:19 被阅读10次
    BAYEK

    今天重新看了一下不能说的秘密,真好看!

    今天我们来看一下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!

    二、结语

    有什么问题可以留言!

    继续!

    共勉!

    相关文章

      网友评论

        本文标题:MotionBuilder Python Script12 -

        本文链接:https://www.haomeiwen.com/subject/szhprctx.html