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 maya.cmds as cmds | |
| mode = cmds.manipMoveContext("Move", q=True, mode=True) | |
| if mode == 1: | |
| new_mode = 2 | |
| print "\nworld", | |
| else: | |
| new_mode = 1 | |
| print "\nlocal", | |
| cmds.manipMoveContext("Move", e=True, mode=new_mode) |
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 maya.utils as utils | |
| import maya.cmds as cmds | |
| import subprocess | |
| import threading | |
| import tempfile | |
| import platform | |
| import os.path | |
| import shutil | |
| import re |
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
| # Isolate selection | |
| import c4d | |
| import c4d.gui as gui | |
| import urllib | |
| import datetime | |
| import platform | |
| import traceback | |
| import contextlib | |
| import webbrowser |
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 re | |
| import maya.cmds as cmds | |
| class Rename(object): | |
| """ Rename objects en mass """ | |
| pattern = "" | |
| replace = "" | |
| def __init__(s): | |
| sel = cmds.ls(sl=True) | |
| if not sel: return cmds.warning("You need to select at least one thing to renmae.") |
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
| # Copy animation crudely to a file and back | |
| import c4d | |
| import c4d.gui as gui | |
| import c4d.storage as storage | |
| import json | |
| import urllib | |
| import os.path | |
| import datetime | |
| import platform |
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
| ssh-keygen -t rsa # ENTER to every field | |
| ssh-copy-id myname@somehost |
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
| # Use geometry as a Rig Controller. | |
| # Created By Jason Dixon. http://internetimagery.com | |
| # | |
| # Usage: Add code below to a shelf button. Select some polygon faces, and a controller object. Hit the button! | |
| # | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # any later version. | |
| # |
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
| REM Move to save file path for backups. Load the game and git-bash to handle backups | |
| REM http://tools.taubenkorb.at/change-screen-resolution/ | |
| ChangeScreenResolution.exe /w=1280 /h=720 /d=0 | |
| start steam://rungameid/374320 | |
| cd /d %APPDATA%\DarkSoulsIII | |
| "%SYSTEMDRIVE%\Program Files (x86)\Git\git-bash.exe" | |
| ChangeScreenResolution.exe /w=1920 /h=1080 /d=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 maya.cmds as cmds | |
| import maya.mel as mel | |
| slider = mel.eval("$tmp = $gPlayBackSlider") | |
| range_ = (cmds.timeControl(slider, q=True, ra=True) or []) if cmds.timeControl(slider, q=True, rv=True) else (cmds.playbackOptions(q=True, min=True), cmds.playbackOptions(q=True, max=True)) | |
| keys = set(cmds.keyframe(q=True, t=range_, tc=True) or []) | |
| cmds.confirmDialog(t="Your selected keys", m=("You have selected keyframes at:\n%s" % ", ".join(sorted([str(a) for a in keys]))) if keys else "No keys selected.") |
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
| # Automatically return the callback if errored | |
| e = (cb1, cb2)-> return (err, args...)-> if err then cb1 err else cb2 args... | |
| # Demo | |
| div = (num1, num2, callback)-> | |
| try | |
| callback null, num1 / num2 | |
| catch err | |
| callback err |