This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
import vo_maya.core.vo_export as voe | |
reload(voe) | |
pm.ogs(pause=True) | |
controls = [u'Roxanne_rWristFKC', u'Roxanne_rUpperLegCurveC', u'Roxanne_rUpperLegCurve3C', u'Roxanne_rUpperLegCurve2C', u'Roxanne_rUpperLegCurve1C', u'Roxanne_rUpperArmCurve3C', u'Roxanne_rUpperArmCurve2C', u'Roxanne_rUpperArmCurve1C', u'Roxanne_rLowerLegCurveC', u'Roxanne_rLowerLegCurve3C', u'Roxanne_rLowerLegCurve2C', u'Roxanne_rLowerLegCurve1C', u'Roxanne_rLowerArmCurve3C', u'Roxanne_rLowerArmCurve2C', u'Roxanne_rLowerArmCurve1C', u'Roxanne_rKneeFKC', u'Roxanne_rKneeCurveC', u'Roxanne_rElbowFKC', u'Roxanne_rBallFKC', u'Roxanne_rAnkleFKC', u'Roxanne_lWristIKC', u'Roxanne_lUpperLegCurveC', u'Roxanne_lUpperLegCurve3C', u'Roxanne_lUpperLegCurve2C', u'Roxanne_lUpperLegCurve1C', u'Roxanne_lUpperArmCurve3C', u'Roxanne_lUpperArmCurve2C', u'Roxanne_lUpperArmCurve1C', u'Roxanne_lLowerLegCurveC', u'Roxanne_lLowerLegCurve3C', u'Roxanne_lLowerLegCurve2C', u'Roxanne_lLowerLegCurve1C', u'Roxanne_lLowerArmCurve3C', u'Roxanne_lLow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eye_ramp = pm.ls('geo:R_eye_ramp')[0] | |
eye_joints = pm.ls(sl=1) | |
eye_control = pm.ls(sl=1)[0] | |
#checked items fill list of attrs | |
#'blink' | |
eye_parts = ('pupil', 'iris') #'offset' | |
eye_attrs = ('radius', 'shape', 'angle', 'stretch') | |
#pm.addAttr(longName = 'iris', type = 'float') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
targets = ['Corsac_R_brow_CTL_04', 'Corsac_R_brow_CTL_03', 'Corsac_R_brow_CTL_02', 'Corsac_R_brow_CTL_01'] | |
controls = pm.ls(targets, recursive = True) | |
for item in controls: | |
pm.selectKey(item, attribute = 'rotateZ', replace = True) | |
pm.keyframe(edit = True, relative = True, valueChange = -180.0) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shutil, os | |
current_directory = os.getcwd() | |
filename = 'output.txt' | |
for file in os.listdir(current_directory): | |
active = file.replace('_idle', '_act') | |
print(active) | |
if '_idle' in file and not os.path.isfile(active): | |
output = file.replace('_idle','_act') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target = pm.ls(sl=1)[0] | |
constraint = set(pm.listConnections(source = True, type = 'constraint')).pop() | |
print(constraint.Target) | |
sources = list(set(constraint.listConnections(source = True, type = 'transform'))) | |
sources.remove(target) | |
source_weight = {} | |
for item in sources: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start_time = 0 | |
end_time = 10 | |
keyed_channels = get_keyed_channels() | |
for curve in keyed_channels: | |
#what is the best method to select the target keys? | |
#select keys in range(start_time,end_time) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
def primitiveWindow(name = 'primitiveWindow'): | |
if pm.window(name, query=True, exists=True): | |
pm.deleteUI(name) | |
pm.window(name) | |
pm.showWindow(name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
def get_blendShape(target): | |
"""Get blendshape of target.""" | |
if (pm.nodeType(target.getShape()) in ["mesh", "nurbsSurface", "nurbsCurve"]): | |
blendShape = pm.listHistory(target, type="blendShape")[0] | |
return blendShape | |
def add_blendShape(new_shape, blend_mesh): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
target_mesh = pm.ls(sl=1)[0] | |
print target_mesh | |
pm.select("mesh:simple_plane.vtx[*]") | |
pm.select("mesh:Xidriel_head_mesh.vtx[*]") | |
target_mesh.vtx[0].select() | |
target_mesh.vtx[:].select() |