Functions | |
def | createEnvelope |
ENVELOPE. More... | |
def | freezeEnvelope |
Freeze the operator stack of given envelope. More... | |
def | rebuiltEnvelope |
Rebuilt given envelope. More... | |
def | copyEnvelopeWithGator |
Allows to copy envelope. More... | |
def | copyMirrorEnvelope |
Copy the envelope to a mirror object. More... | |
def | addStaticKineState |
Add a static kine state property to objects. More... | |
def | isDeformer |
DEFORMERS. More... | |
def | getDeformerIndex |
Get the deformer index. More... | |
def | replaceDeformerInEnvelope |
Replace a collection of deformer with another one in the envelope. More... | |
def | removeEnvDeformer |
Remove a Deformer from given envelope. More... | |
def | getUnnormalizedPoints |
WEIGHTS. More... | |
def | normalizeWeights |
Normalize the weight array to 100 for given point of given envelope op. More... | |
def | normalizeToClosestPoint |
Normalize the point according to surronding values. More... | |
def | normalizeToDeformer |
Add the missing weight of a point to given deformer. More... | |
def | normalizeArray |
Normalize given array so the sum of the array is equal to 100. More... | |
def | pruneWeights |
Remove the influence of deformers that are smaller than threshold. More... | |
def | averageMirrorWeights |
This is for the central line of the mesh, it setthe weight properly splitted between right and left side. More... | |
def | makeIslandRigid |
def | createSymmetryMappingTemplate |
Create a symmetry mapping template for given deformers using the naming convention for right and left objects. More... | |
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
def gear.xsi.envelope.addStaticKineState | ( | objs | ) |
Add a static kine state property to objects.
objs | List or Collection of X3DObject - Objects to create a StaticKineState property on. |
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.
envelope_op | Envelope Operator - the envelope operator. |
points | List of Integer - list of point index to mirror. |
def gear.xsi.envelope.copyEnvelopeWithGator | ( | mesh, | |
source_meshes | |||
) |
Allows to copy envelope.
mesh | Polymsh. |
source_meshes | - XSICollection of Polymsh. |
def gear.xsi.envelope.copyMirrorEnvelope | ( | source_mesh, | |
target_mesh | |||
) |
Copy the envelope to a mirror object.
source_mesh | Polymsh. |
target_mesh | Polymsh. |
def gear.xsi.envelope.createEnvelope | ( | obj, | |
deformers | |||
) |
ENVELOPE.
createEnvelope ========================================= Apply envelope
obj | to apply the envelope. |
deformers,: | List of deformers |
def gear.xsi.envelope.createSymmetryMappingTemplate | ( | in_deformers | ) |
Create a symmetry mapping template for given deformers using the naming convention for right and left objects.
in_deformers | XSICollection |
def gear.xsi.envelope.freezeEnvelope | ( | envelope_op | ) |
Freeze the operator stack of given envelope.
envelope_op | Envelope Operator - the envelope operator to freeze. |
def gear.xsi.envelope.getDeformerIndex | ( | envelope_op, | |
obj | |||
) |
Get the deformer index.
envelope_op | Envelope Operator - the envelope operator. |
obj | X3DObject - Object to check. |
def gear.xsi.envelope.getUnnormalizedPoints | ( | envelope_op, | |
points = None , |
|||
threshold = 1E-6 |
|||
) |
WEIGHTS.
GetUnnormalizedPoints ================================= Return the indexes of unormalized points of the envelope.
envelope_op | Envelope Operator - the envelope operator. |
threshold | Float - the threshold. |
def gear.xsi.envelope.isDeformer | ( | envelope_op, | |
obj | |||
) |
DEFORMERS.
Is Deformer =========================================== Check if the object is a deformer of given envelope
envelope_op | Envelope Operator - the envelope operator. |
obj | X3DObject - Object to check. |
def gear.xsi.envelope.makeIslandRigid | ( | mesh | ) |
envelope_op | Envelope Operator - the envelope operator. |
points | List of Integer - list of point index to mirror. |
def gear.xsi.envelope.normalizeArray | ( | a | ) |
Normalize given array so the sum of the array is equal to 100.
a | List of Float - the array 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.
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. |
def gear.xsi.envelope.normalizeToDeformer | ( | envelope_op, | |
deformers, | |||
points = None , |
|||
threshold = 1E-6 |
|||
) |
Add the missing weight of a point to given deformer.
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.normalizeWeights | ( | envelope_op, | |
points | |||
) |
Normalize the weight array to 100 for given point of given envelope op.
envelope_op | Operator - Envelope operator to normalize |
points | List of Integer - Index of vertices to normalize |
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.
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. |
def gear.xsi.envelope.rebuiltEnvelope | ( | envelope_op | ) |
Rebuilt given envelope.
envelope_op | Envelope Operator - the envelope operator. |
def gear.xsi.envelope.removeEnvDeformer | ( | envelope_op, | |
obj | |||
) |
Remove a Deformer from given envelope.
envelope_op | Envelope Operator - the envelope operator. |
deformer | X3DObject - the deformer to remove from envelope. |
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.
envelope_op | Envelope Operator - the envelope operator. |
source_deformers | XSICollection - Deformers we want to remove. |
target_deformers | XSICollection - Deformers we want to add. |