Skip to content
This repository was archived by the owner on Oct 7, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions scripts/mgear/rigbits/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pymel.core import datatypes
from pymel import util as pmu


import mgear
from mgear.core import icon, applyop, node, transform, attribute
from mgear.core import primitive, meshNavigation, string
Expand Down Expand Up @@ -295,7 +294,7 @@ def connectWorldTransform(source, target):


def connectLocalTransform(objects=None, s=True, r=True, t=True, *args):
"""Connect scale, rotatio and translation.
"""Connect scale, rotation and translation.

Args:
objects (None or list of dagNode, optional): If None will use the
Expand Down Expand Up @@ -350,16 +349,16 @@ def connectUserDefinedChannels(source, targets):


def connectInvertSRT(source, target, srt="srt", axis="xyz"):
"""Connect the locat transformations with inverted values.
"""Connect the local transformations with inverted values.

Args:
source (dagNode): The source driver dagNode
target (dagNode): The target driven dagNode
srt (string, optional): String value for the scale(s), rotate(r),
translation(t). Default value is "srt". Posible values "s", "r",
translation(t). Default value is "srt". Possible values "s", "r",
"t" or any combination
axis (string, optional): String value for the axis. Default
value is "xyz". Posible values "x", "y", "z" or any combination
value is "xyz". Possible values "x", "y", "z" or any combination
"""
for t in srt:
soureList = []
Expand Down Expand Up @@ -405,7 +404,7 @@ def replaceShape(source=None, targets=None, *args):
if shape:
cnx = shape[0].listConnections(plugs=True, c=True)
cnx = [[c[1], c[0].shortName()] for c in cnx]
# Disconnect the conexion before delete the old shape
# Disconnect the connection before delete the old shape
for s in shape:
for c in s.listConnections(plugs=True, c=True):
pm.disconnectAttr(c[0])
Expand All @@ -422,9 +421,9 @@ def replaceShape(source=None, targets=None, *args):


def matchPosfromBBox(*args):
"""Match the position usin bounding box of another object another.
"""Match the position using bounding box of another object another.

Match the position of one object, using the boundig box center of
Match the position of one object, using the bounding box center of
another object.

"""
Expand Down Expand Up @@ -491,7 +490,7 @@ def createInterpolateTransform(objects=None, blend=.5, *args):
*args: Maya's dummy

Returns:
pyNode: The new transformation witht the interpolate matrix o_node
pyNode: The new transformation with the interpolate matrix o_node
applied.

"""
Expand Down
4 changes: 2 additions & 2 deletions scripts/mgear/rigbits/facial_rigger/brow_rigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ def getSide(name):
for crv in [mainRope_upv, mainCrv_upv]:
cvs = crv.getCVs(space="world")
for i, cv in enumerate(cvs):
# we populate the closest vertext list here to skipt the first
# we populate the closest vertext list here to skip the first
# and latest point
offset = [cv[0], cv[1], cv[2] + FRONT_OFFSET]
crv.setCV(i, offset, space='world')
Expand All @@ -784,7 +784,7 @@ def getSide(name):
pm.displayWarning("The brow rig can not be parent to: %s. Maybe "
"this object doesn't exist." % parent_node)

# Reparent controls
# Re-parent controls
# TODO: this can be more simple an easy to read
for ctl in mainControls:
tag_parent = None
Expand Down
3 changes: 2 additions & 1 deletion scripts/mgear/rigbits/facial_rigger/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def matrixBlendConstraint(parent=None, # should be a list
keyable=True,
attributeType='float',
min=0.0,
max=1.0)
max=1.0,
defaultValue=weights[x])
pm.connectAttr(host + "." + name,
wtMat_node + ".wtMatrix[{}].weightIn".format(x))
pm.setAttr(host + "." + name, weights[x])
Expand Down