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

Classes

class  Chain
 
class  Primitive
 
class  Null
 
class  NurbsCurve
 

Functions

def generateFromXml
 ========================================================
 
def addNull
 NULL. More...
 
def addNullFromPos
 Create a null with a given position and size. More...
 
def addNullsFromPositions
 Create a nulls with a given position list . More...
 
def setNullDisplay
 Set the display of a Null. More...
 
def drawAxis
 Axis. More...
 
def addImplicite
 IMPLICITE. More...
 
def addBone
 BONE. More...
 
def addBoneFromPos
 Create a bone with a given position and length. More...
 
def add2DChain
 CHAINS. More...
 
def alignRootToFirstBone
 
def addNullChain
 Create a chain of null Used to create chain of fk controlers. More...
 
def addCubeChain
 Create a chain of fk controlers (icon.cube). More...
 
def addLattice
 
def createOrReturnPSet
 Create or return the gear_PSet property if one was found with the same name. More...
 
def createOrReturnGroup
 Create or return group. More...
 
def getPrimitive
 CLASS.
 

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, Miquel Campos

Function Documentation

def gear.xsi.primitive.add2DChain (   parent,
  name,
  positions,
  normal = None,
  negate = False,
  size = 1,
  alignRoot = False 
)

CHAINS.

========================================================

def gear.xsi.primitive.addBone (   parent,
  name,
  t = XSIMath.CreateTransform(),
  length = 1 
)

BONE.

======================================================== Create a bone with a given transform and length.

Parameters
parentX3DObject - Parent object.
nameString - Name.
tSITransformation - Global transform.
lengthDouble - Display size.
Returns
Implicite - The newly created implicite.
def gear.xsi.primitive.addBoneFromPos (   parent,
  name,
  position = XSIMath.CreateVector3(),
  length = 1 
)

Create a bone with a given position and length.

Parameters
parentX3DObject - Parent object.
nameString - Name.
positionSIVector3 - Global position.
lengthDouble - Display size.
Returns
Implicite - The newly created implicite.
def gear.xsi.primitive.addCubeChain (   parent,
  name,
  positions,
  normal,
  negate = False,
  size = 1,
  color = [0 
)

Create a chain of fk controlers (icon.cube).

Parameters
parentX3DObject - Parent object.
nameString - Name.
positionsList of SIVector3 - positions of the curve points.
normalSIVector3 - normal direction.
negateBoolean - True to create a negative scale chain.
sizeFloat - Size of the controlers.
colorList of Double - The RGB color of the object (ie. [1,0,0] for red).
Returns
List of NurbCurve - The newly created curve.
def gear.xsi.primitive.addImplicite (   parent,
  preset,
  name,
  t = XSIMath.CreateTransform(),
  size = 1 
)

IMPLICITE.

======================================================== Create an implicite with a given transform and size.

Parameters
parentX3DObject - Parent object.
presetString - Implicite type (ie. Cube, Cone, Sphere...).
nameString - Name.
tSITransformation - Global transform.
sizeDouble - Display size.
Returns
Implicite - The newly created implicite.
def gear.xsi.primitive.addNull (   parent,
  name,
  t = XSIMath.CreateTransform(),
  size = 1,
  color = [0 
)

NULL.

Create a null with a given transform and size.

Parameters
parentX3DObject - Parent object.
nameString - Null name.
tSITransformation - Null global transform.
sizeDouble - Null display size.
Returns
Null - The newly created null.
def gear.xsi.primitive.addNullChain (   parent,
  name,
  positions,
  normal,
  negate = False,
  size = 1 
)

Create a chain of null Used to create chain of fk controlers.

Parameters
parentX3DObject - Parent object.
nameString - Name.
positionsList of SiVector3 - Positions of the controlers.
normalSIVector3 - Normal vector. (Z axes)
negateBoolean - Create a chain for negative side. (-X axes pointing forward)
sizeDouble - Display size.
Returns
List of Null - The newly created chain.
def gear.xsi.primitive.addNullFromPos (   parent,
  name,
  position = XSIMath.CreateVector3(),
  size = 1,
  color = [0 
)

Create a null with a given position and size.

Parameters
parentX3DObject - Parent object.
nameString - Null name.
positionSIVector3 - Null global position.
sizeDouble - Null display size.
Returns
Null - The newly created null.
def gear.xsi.primitive.addNullsFromPositions (   parent,
  name,
  positions,
  rot_offset = XSIMath.CreateRotation(),
  size = 1,
  color = [0 
)

Create a nulls with a given position list .

Parameters
parentX3DObject - Parent object.
nameString - Null name.
positionsList of SiVector3 - Positions of the controlers.
rot_offSIRotation - Rotation offset.
sizeDouble - Null display size.
Returns
Null - The newly created null.
def gear.xsi.primitive.createOrReturnGroup (   model,
  name 
)

Create or return group.

Parameters
modelModel - Model hosting the group.
nameString - Name of the group.
Returns
Group
def gear.xsi.primitive.createOrReturnPSet (   obj,
  name 
)

Create or return the gear_PSet property if one was found with the same name.

Parameters
objX3DObject - Object hosting the property.
nameString - Name of the property.
Returns
Property - sn_PSet property.
def gear.xsi.primitive.drawAxis (   parent = xsi.ActiveSceneRoot,
  size = 1 
)

Axis.

========================================================

def gear.xsi.primitive.setNullDisplay (   null,
  pri_icon = None,
  size = None,
  shd_icon = None,
  shd_offx = None,
  shd_offy = None,
  shd_offz = None,
  shd_sclx = None,
  shd_scly = None,
  shd_sclz = None,
  color = None 
)

Set the display of a Null.

Parameters
nullX3DObject - Null object.
pri_iconInteger - Null primary icon.
sizeDouble - Null display size.
shd_iconInteger - Null shadow icon.
shd_offxDouble - Null shadow offset position X.
shd_offyDouble - Null shadow offset position Y.
shd_offzDouble - Null shadow offset position Z.
shd_sclxDouble - Null shadow offset scaling X.
shd_sclyDouble - Null shadow offset scaling Y.
shd_sclzDouble - Null shadow offset scaling Z.
colorList of Double - The RGB color of the Null (ie. [1,0,0] for red)
Returns