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
| id seq = [CCSequence actions:[CCMoveTo actionWithDuration:0.0 position:ccp(249, 180)], | |
| [CCMoveTo actionWithDuration:27.29 position:ccp(753, 180)], | |
| [CCMoveTo actionWithDuration:1.5 position:ccp(774, 180)], | |
| [CCMoveTo actionWithDuration:0.63 position:ccp(779, 180)], | |
| [CCMoveTo actionWithDuration:0.71 position:ccp(783, 180)], | |
| [CCMoveTo actionWithDuration:3.33 position:ccp(780, 180)], | |
| [CCMoveTo actionWithDuration:1.46 position:ccp(778, 147)], | |
| [CCMoveTo actionWithDuration:18.04 position:ccp(762, -876)], | |
| [CCMoveTo actionWithDuration:1.63 position:ccp(761, -925)], | |
| [CCMoveTo actionWithDuration:1.38 position:ccp(760, -940)], |
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
| def switchDriver(node, index): | |
| spaceA = node.getParent() | |
| spaceB = getDriver(index) | |
| deltaMatrix = getSpaceSwitch(spaceA, spaceB) | |
| # change driver | |
| node.driver.set(index) | |
| node.translateSpace.set(deltaMatrix.getTranslation('world')) | |
| newRot = deltaMatrix.getRotation() | |
| newRot.setDisplayUnit('degrees') | |
| node.rotateSpace.set(dt.Vector(newRot[0], newRot[1], newRot[2])) |
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
| opts = SCENE.miDefaultOptions | |
| key = 'ambient occlusion' | |
| for item in opts.stringOptions: | |
| if item.attr('name').get() == key: | |
| item.value.set('true') |
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
| from pymel.core import * | |
| for x in ls(type='nCloth'): | |
| x.solverDisplay.set(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
| from pymel.core import * | |
| for x in cmds.ls(r=True, l=True): | |
| try: | |
| PyNode(x) | |
| except Exception as e: | |
| print('bad node {0}: {1}'.format(x, e)) |
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 production | |
| from mbotutils import proarchutils | |
| from mbotutils import hourglassutils | |
| proj = hourglassutils.getProject('diggs-game') | |
| arch = proarchutils.getProjectArch(proj) | |
| arch['assetType'].name = 'character' | |
| arch['asset'].name = 'pig1' | |
| arch['assetStep'].name = 'rig' |
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 os | |
| from pymel.core import * | |
| import exportUtils | |
| reload(exportUtils) | |
| # get rig/publish directory relative to mod/work | |
| d = os.path.dirname | |
| outDir = os.path.join(d(d(d(sceneName()))), 'rig/publish') | |
| exportUtils.exportAssemblies(outDir, resetPositions=True) |
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 butterfly | |
| from butterfly.attrs import LinkerAttr as A | |
| def combineAndCluster(geo): | |
| # combine the geometry | |
| newGeo = pm.duplicate(geo) | |
| combinedMesh = pm.polyUnite(newGeo, ch=False)[0] | |
| # cluster the combined mesh | |
| transforms = [] |
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 getUnlinkedLights(): | |
| linker = pm.selected()[0] | |
| lonely = [] | |
| for i in range(linker.link.numElements()): | |
| ln = linker.link[i] | |
| lights = ln.light.inputs() | |
| objects = ln.object.inputs() | |
| if len(lights) and not len(objects): |
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 subprocess | |
| sceneName = pm.sceneName() | |
| if sceneName: | |
| sceneName = str(sceneName.parent).replace('/', '\\') | |
| subprocess.call(['explorer.exe', sceneName]) |
OlderNewer