This file contains 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
#coding:utf-8 | |
import urllib | |
import urllib2 | |
import cookielib | |
import json | |
# python :: urllib2 でhttps通信したときのめも - ichirin2501の日記 | |
# http://d.hatena.ne.jp/ichirin2501/20110428/1303924574 | |
# | |
# ssl通信を行う場合に必要。 |
This file contains 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
#!/usr/bin/env python | |
# -*- coding=utf-8 -*- | |
import sys | |
import os | |
import subprocess | |
from datetime import datetime | |
def exists_check(path): | |
if not os.path.exists(path): |
This file contains 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 | |
for trans in pm.ls(sl=True): | |
shape = trans.getShape() | |
if not type(shape) == pm.nodetypes.NurbsCurve: | |
print ('{} is not NurbsCurve. skipped.'.format(shapw.longName())) | |
continue | |
trans.setPivots(shape.getCV(0)) |
This file contains 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
# -*- coding: utf-8 -*- | |
import pymel.core as pm | |
def divide_select_list(select_list): | |
movers = select_list[0:-1] | |
trans = select_list[-1] | |
mesh = trans.getShape() | |
if not type(mesh) == pm.nodetypes.Mesh: | |
raise Exception(u'Finally select the mesh.') |
This file contains 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
# -*- coding: utf-8 -*- | |
import pymel.core as pm | |
import re | |
from itertools import chain | |
def divide_select_list(selectlist): | |
if 2 > len(selectlist): | |
raise Exception(u'Please select clusters and mesh.') |
This file contains 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
class optionsWindow(object): | |
""" | |
optionsWindow base class. | |
""" | |
def __init__(self): | |
self.name = 'optionsWindow' | |
self.title = 'Options Window' | |
self.supportsToolAction = False | |
self.actionName = 'Apply and Close' |
This file contains 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
# -*- coding: utf-8 -*- | |
import pymel.core as pm | |
import os | |
import json | |
class OptionsWindow(object): | |
""" | |
optionsWindow base class. | |
""" |
This file contains 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 json | |
import os | |
class JsonFile(object): | |
def __init__(self, file_name): | |
self.file_name = file_name | |
def save(self, **kwds): | |
try: |
OlderNewer