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

Classes

class  ParamDef
 PARAMETER DEFINITION. More...
 
class  ParamDef2
 Create a parameter definition using the AddParameter2 mapping. More...
 
class  ParamDef3
 Create a parameter definition using the AddParameter3 mapping. More...
 
class  FCurveParamDef
 Create an Fcurve parameter definition. More...
 

Functions

def setLimit
 PARAMETER. More...
 
def linkLocalParams
 Set an expression on local parameter of target object equal to source parameter. More...
 
def setKeyableParameters
 Set Capabilities of given local parameters to keyable or nonKeyable. More...
 
def addLocalParamToCollection
 Add the local parameter of given object to collection. More...
 
def setRotOrder
 Set the rotorder of the object. More...
 
def createOrReturnParameters3
 Create or return the parameter if it already exists. More...
 
def addExpression
 Add an expression to given parameter. More...
 
def convertVariantType
 Convert a variant according to XSI siVariantType. More...
 
def getDictFromGridData
 DATA GRID. More...
 
def setDataGridFromDict
 

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.parameter.addExpression (   param,
  definition 
)

Add an expression to given parameter.

Log an error if expression is invalid.

Parameters
paramParameter - The parameter to apply the expression on.
expString - The expression.
Returns
def gear.xsi.parameter.addLocalParamToCollection (   collection,
  obj,
  params = None 
)

Add the local parameter of given object to collection.

Parameters
collectionXSICollection - The collection to fill up.
objX3DObject - The object to get the local parameter from.
paramsList of String - List of local parameter name.
if None, ["posx", "posy", "posz", "rotorder", "rotx", "roty", "rotz", "sclx", "scly", "sclz"] is used
Returns
def gear.xsi.parameter.convertVariantType (   value,
  variantType 
)

Convert a variant according to XSI siVariantType.

Parameters
valueString - Value as string.
variantTypeInt - siVariantType.
Returns
def gear.xsi.parameter.createOrReturnParameters3 (   prop,
  scriptName,
  valueType,
  defaultValue,
  minimum,
  maximum,
  animatable = True,
  readonly = False 
)

Create or return the parameter if it already exists.

Parameters
propProperty - The property to add the parameter to.
scriptNameString - The scripting name of parameter.
valueTypeInteger - Parameter Type (siString, siBool, siDouble, siInt4...).
defaultValueVariant - Default value of parameter.
minimumVariant - Minimum value of parameter.
maximumVariant - Maximum value of parameter.
animatableBoolean - Parameter is animatable.
readonlyBoolean - Parameter is readonly.
Returns
def gear.xsi.parameter.getDictFromGridData (   grid_data)

DATA GRID.

======================================================== Return a grid data as a dictionary

Parameters
grid_dataGridData #return Dictionary
def gear.xsi.parameter.linkLocalParams (   target,
  source,
  params = None,
  addPivot = False 
)

Set an expression on local parameter of target object equal to source parameter.

Parameters
targetX3DObject - The object to apply the expression on.
sourceX3DObject - The object reference for the expression.
paramsList of String - List of local parameter name.
if None, ["posx", "posy", "posz", "rotorder", "rotx", "roty", "rotz", "sclx", "scly", "sclz"] is used
addPivotBoolean - True to add the pivot local parameter in the expression.
Returns
def gear.xsi.parameter.setKeyableParameters (   objects,
  params = None 
)

Set Capabilities of given local parameters to keyable or nonKeyable.

Parameters
objX3DObject - The object to set.
paramsList of String - The local parameter to set as keyable. params not in the list will be locked (expression + readonly)
if None, ["posx", "posy", "posz", "rotorder", "rotx", "roty", "rotz", "sclx", "scly", "sclz"] is used
Returns
def gear.xsi.parameter.setLimit (   obj,
  params = None,
  minimum = 0,
  maximum = 0 
)

PARAMETER.

======================================================== Set the local limit of given object to min and max

Parameters
objX3DObject - The object to set limit on.
paramsList of String - List of local parameter name to limit. (only rotation and position)
if None, ["rotx", "roty", "rotz", "posx", "posy", "posz"] is used
minimumDouble - The minimum value.
maximumDouble - The maximum value.
Returns
def gear.xsi.parameter.setRotOrder (   obj,
  s = "XYZ" 
)

Set the rotorder of the object.

Parameters
objX3DObject - The object to set the rot order on
sString - Value of the rotorder. Possible values : ("XYZ", "XZY", "YXZ", "YZX", "ZXY", "ZYX")
Returns