gear::xsi::envelope Namespace Reference

Functions

def freezeEnvelope
 Freeze the operator stack of given envelope.
def rebuiltEnvelope
 Rebuilt given envelope.
def copyEnvelopeWithGator
 Allows to copy envelope.
def copyMirrorEnvelope
 Copy the envelope to a mirror object.
def addStaticKineState
 Add a static kine state property to objects.
def isDeformer
 Check if the object is a deformer of given envelope.
def getDeformerIndex
 Get the deformer index.
def replaceDeformerInEnvelope
 Replace a collection of deformer with another one in the envelope.
def removeEnvDeformer
 Remove a Deformer from given envelope.
def getUnnormalizedPoints
 Return the indexes of unormalized points of the envelope.
def normalizeWeights
 Normalize the weight array to 100 for given point of given envelope op.
def normalizeToClosestPoint
 Normalize the point according to surronding values.
def normalizeToDeformer
 Add the missing weight of a point to given deformer.
def normalizeArray
 Normalize given array so the sum of the array is equal to 100.
def pruneWeights
 Remove the influence of deformers that are smaller than threshold.
def averageMirrorWeights
 This is for the central line of the mesh, it setthe weight properly splitted between right and left side.
def createSymmetryMappingTemplate
 Create a symmetry mapping template for given deformers using the naming convention for right and left objects.

Detailed Description


This file is part of GEAR.

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
Company:    Studio Nest (TM)
Date:       2010 / 11 / 15

Author:
Jeremie Passerin

Function Documentation

def gear::xsi::envelope::freezeEnvelope (   envelope_op  ) 

Freeze the operator stack of given envelope.

Parameters:
envelope_op Envelope Operator - the envelope operator to freeze.
Returns:
def gear::xsi::envelope::rebuiltEnvelope (   envelope_op  ) 

Rebuilt given envelope.

Parameters:
envelope_op Envelope Operator - the envelope operator.
Returns:
Operator - the newly created envelope operator.
def gear::xsi::envelope::copyEnvelopeWithGator (   mesh,
  source_meshes 
)

Allows to copy envelope.

Parameters:
mesh Polymsh.
source_meshes - XSICollection of Polymsh.
def gear::xsi::envelope::copyMirrorEnvelope (   source_mesh,
  target_mesh 
)

Copy the envelope to a mirror object.

Parameters:
source_mesh Polymsh.
target_mesh Polymsh.
def gear::xsi::envelope::addStaticKineState (   objs  ) 

Add a static kine state property to objects.

Parameters:
objs List or Collection of X3DObject - Objects to create a StaticKineState property on.
Returns:
List of Property - the newly created properties.
def gear::xsi::envelope::isDeformer (   envelope_op,
  obj 
)

Check if the object is a deformer of given envelope.

Parameters:
envelope_op Envelope Operator - the envelope operator.
obj X3DObject - Object to check.
Returns:
true if the object is used as a deformer for the given envelope.
def gear::xsi::envelope::getDeformerIndex (   envelope_op,
  obj 
)

Get the deformer index.

Parameters:
envelope_op Envelope Operator - the envelope operator.
obj X3DObject - Object to check.
Returns:
the index of the deformer in the envelope (-1 if it's not found).
def gear::xsi::envelope::replaceDeformerInEnvelope (   envelope_op,
  source_deformers,
  target_deformers,
  points = None 
)

Replace a collection of deformer with another one in the envelope.


This method don't replace the deformers from 1 source to 1 target deformer. Instead can replace 1 source deformer to x target deformers
or x source deformers to 1 target deformer. For this reason the envelopes will be regenerate.

Parameters:
envelope_op Envelope Operator - the envelope operator.
source_deformers XSICollection - Deformers we want to remove.
target_deformers XSICollection - Deformers we want to add.
def gear::xsi::envelope::removeEnvDeformer (   envelope_op,
  obj 
)

Remove a Deformer from given envelope.

Parameters:
envelope_op Envelope Operator - the envelope operator.
deformer X3DObject - the deformer to remove from envelope.
Returns:
Envelope Operator - The newly created envelope operator
def gear::xsi::envelope::getUnnormalizedPoints (   envelope_op,
  points = None,
  threshold = 1E-6 
)

Return the indexes of unormalized points of the envelope.

Parameters:
envelope_op Envelope Operator - the envelope operator.
threshold Float - the threshold.
Returns:
List of Integer - the list of unnormalized point index .
def gear::xsi::envelope::normalizeWeights (   envelope_op,
  points 
)

Normalize the weight array to 100 for given point of given envelope op.

Parameters:
envelope_op Operator - Envelope operator to normalize
points List of Integer - Index of vertices to normalize
def gear::xsi::envelope::normalizeToClosestPoint (   envelope_op,
  weights,
  point_index 
)

Normalize the point according to surronding values.

Useful when a point weight is 0.

Parameters:
envelope_op Envelope Operator - the envelope operator.
weights List of float - The weights of the envelope. We pass it as an argument for speed purpose.
point_index Integer - Index of the point to normalize.
Returns:
List of Float - The weight of the point.
def gear::xsi::envelope::normalizeToDeformer (   envelope_op,
  deformers,
  points = None,
  threshold = 1E-6 
)

Add the missing weight of a point to given deformer.

Parameters:
envelope_op Operator - Envelope operator to normalize
deformers XSICollection - Collection of deformers
points List of Integer - Index of vertices to normalize
threshold Float
def gear::xsi::envelope::normalizeArray (   a  ) 

Normalize given array so the sum of the array is equal to 100.

Parameters:
a List of Float - the array to normalize.
Returns:
List of Float - the normalized array.
def gear::xsi::envelope::pruneWeights (   envelope_op,
  points = None,
  threshold = .1,
  remove = False,
  showPBar = False 
)

Remove the influence of deformers that are smaller than threshold.


Parameters:
envelope_op Envelope Operator - the envelope operator.
threshold Float - Minimum influence a deformer can have.
remove Boolean - Remove the unsued deformers.
showPBar Boolean - Display a progress bar.
Returns:
Envelope Operator
def gear::xsi::envelope::averageMirrorWeights (   envelope_op,
  points 
)

This is for the central line of the mesh, it setthe weight properly splitted between right and left side.

Parameters:
envelope_op Envelope Operator - the envelope operator.
points List of Integer - list of point index to mirror.
def gear::xsi::envelope::createSymmetryMappingTemplate (   in_deformers  ) 

Create a symmetry mapping template for given deformers using the naming convention for right and left objects.

Parameters:
in_deformers XSICollection
Returns:
Property - Mapping Template
Generated by  doxygen 1.6.2-20100208