gear_mc
 All Classes Namespaces Functions Variables
Classes | Functions
gear.xsi.uitoolkit Namespace Reference

Classes

class  ProgressLog
 PROGRESS LOGGER. More...
 

Functions

def fileBrowser
 FILE FOLDER BROWSER. More...
 
def folderBrowser
 Call a folder browser UI. More...
 
def pickSession
 PICK SESSION. More...
 
def pickSessionMulti
 Launch a pickSession for multiple objects. More...
 
def pickPosition
 Launch a pick position session for a unique position. More...
 
def pickPositionMulti
 Launch a pick position session for multiple positions. More...
 
def msgBox
 MESSAGE BOX. More...
 
def popWindow
 POP WINDOW. More...
 
def progressBar
 PROGRESS BAR. More...
 
def resetProgressBar
 Reset a ProgressBar (XSI Object). More...
 

Detailed Description

This file is part of GEAR_mc.
GEAR_mc is a fork of Jeremie Passerin's GEAR project.

GEAR is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/lgpl.html>.

Author:     Jeremie Passerin    geerem@hotmail.com  www.jeremiepasserin.com
Fork Author:  Miquel Campos       hello@miqueltd.com  www.miqueltd.com
Date:       2013 / 08 / 16
Author
Jeremie Passerin

Function Documentation

def gear.xsi.uitoolkit.fileBrowser (   title,
  initialDirectory = xsi.ActiveProject2.OriginPath,
  fileName = "",
  filters = [],
  save = False 
)

FILE FOLDER BROWSER.

======================================================== Call a file browser UI.

Parameters
titleString - Name of the UI.
initialDirectoryString - Initial path of the file browser.
fileNameString - Initial name of the file.
filtersList of String - List of extension to filter.
saveBoolean - True to make it a saving UI. (Will ask confirmation of the file already exists)
Returns
String - The path of the file. False if command was aborded.
def gear.xsi.uitoolkit.folderBrowser (   title,
  initialDirectory 
)

Call a folder browser UI.

Parameters
titleString - Name of the UI.
initialDirectoryString - Initial path of the file browser.
Returns
String - The path of the folder. False if command was aborded.
def gear.xsi.uitoolkit.msgBox (   message,
  flag = c.siMsgExclamation,
  caption = "" 
)

MESSAGE BOX.

======================================================== Open a message box ui.

Parameters
messageString - Text to display.
flagString - Flags to control the appearance of the dialog.
captionString - Text to show in the title of the Message Box.
Returns
Integer - Return values from XSIUIToolkit.MsgBox that indicates which button was pressed by the user.
def gear.xsi.uitoolkit.pickPosition (   message = "Pick position",
  logWarning = True 
)

Launch a pick position session for a unique position.

Parameters
messageString - Help message for picking session.
logWarningBoolean - True to log a warning if pick session is aborded.
Returns
SIVector3 - The picked position. False if PickSession is aborded.
def gear.xsi.uitoolkit.pickPositionMulti (   message = "Pick position",
  logWarning = True,
  minimum = 1,
  maximum = -1 
)

Launch a pick position session for multiple positions.

Parameters
messageString - Help message for picking session.
logWarningBoolean - True to log a warning if pick session is aborded.
minimumInteger - Minimum number position picked.
maximumInteger - Maximum number of position picked. (set to -1 for infinite)
Returns
List of SIVector3 - The picked positions. False if PickSession is aborded.
def gear.xsi.uitoolkit.pickSession (   objectFilter = c.siGenericObjectFilter,
  message = "Pick Object",
  logWarning = True 
)

PICK SESSION.

======================================================== Launch a pickSession for a unique object.

Parameters
objectFilterString - Object filter.
messageString - Help message for picking session.
logWarningBoolean - True to log a warning if pick session is aborded.
Returns
X3DObject - The picked object. False if PickSession is aborded.
def gear.xsi.uitoolkit.pickSessionMulti (   objectFilter = c.siGenericObjectFilter,
  message = "Pick Object",
  logWarning = True,
  minimum = 1,
  maximum = -1 
)

Launch a pickSession for multiple objects.

Parameters
objectFilterString - Object filter.
messageString - Help message for picking session.
logWarningBoolean - True to log a warning if pick session is aborded.
minimumInteger - Minimum number position picked.
maximumInteger - Maximum number of position picked. (set to -1 for infinite)
Returns
List of X3DObject - The picked objects. False if PickSession is aborded.
def gear.xsi.uitoolkit.popWindow (   prop,
  width = 100,
  height = 100,
  posX = None,
  posY = None 
)

POP WINDOW.

======================================================== Open property.

Parameters
propProperty - The property to open.
widthInteger - Width of the window.
heightInteger - Height of the window.
posXInteger - X position of the window.
posYInteger - Y position of the window.
Returns
def gear.xsi.uitoolkit.progressBar (   maximum,
  step,
  caption,
  statusText,
  cancel 
)

PROGRESS BAR.

======================================================== Create a ProgressBar (XSI Object).

Parameters
maximumDouble - Maximum length of the progressbar.
stepDouble - step of progression.
captionString - Main caption text.
statutTextString - secondary caption text.
cancelBoolean - Display a cancel button on the progress bar.
Returns
ProgressBar.
def gear.xsi.uitoolkit.resetProgressBar (   progressBar,
  maximum = None,
  step = None,
  caption = None,
  statusText = None 
)

Reset a ProgressBar (XSI Object).

Parameters
progressBarProgressBar.
maximumDouble - Maximum length of the progressbar.
stepDouble - step of progression.
captionString - Main caption text.
statutTextString - secondary caption text.
Returns
ProgressBar.