Created
October 6, 2017 17:45
-
-
Save PeterDrakeNichols/7049a4c9ab29f825f937e66ab8eec1f7 to your computer and use it in GitHub Desktop.
ghost robot script editor
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 sys, os | |
import maya.cmds as mc | |
import rigit.v1_0 as rigit | |
mobilePath = 'C:/Users/Peter/Google Drive/projects/' | |
officePath = '//MONTANA/jobs/ghost/bipedal_drone/assets/' | |
workingPath = officePath | |
assetName = 'bipod' | |
characterNames = [assetName] | |
scriptPath = workingPath + assetName +'/scripts/python' | |
import sys | |
if not scriptPath in sys.path: | |
sys.path.append(scriptPath) | |
for p in sys.path: | |
print p | |
from bipodRig import rig | |
reload(rig) | |
rig.mainAssetFolder = workingPath + '/%s/' | |
rig.setup( assetName, loadSkinWeights = True, loadControlShapes = True ) | |
controlShapesFilepath = workingPath + assetName + '/controlShapes/bipod_ctlShapes.xml' | |
controls = mc.ls('*_ctl', type= 'transform') | |
#rigit.tools.saveCvPositions.save( controlShapesFilepath, controls ) | |
rigit.tools.saveCvPositions.load( controlShapesFilepath, controls ) | |
objs = mc.ls(sl=1) | |
constPath = workingPath + assetName + '/constraints/bipod_model.cns' | |
#rigit.tools.saveConstraints.save( objectList = objs, filepath = constPath ) | |
mc.select('spinePartsNoTrans_grp') | |
#skinnedObjects.append('spine_srf') | |
#skinnedObjects = mc.ls(sl=1) | |
skinWeightsDir = workingPath + assetName + '/weights/generic' | |
#rigit.tools.saveSkinWeights.saveToDir( skinnedObjects, skinWeightsDir ) | |
rigit.tools.saveSkinWeights.loadFromDir( skinWeightsDir, geoList = skinnedObjects ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment