Skip to content

Instantly share code, notes, and snippets.

@tm8r
tm8r / konami_command.py
Last active December 2, 2017 08:04
Mayaでコナミコマンド
# -*- coding: utf-8 -*-
u"""KonamiCommand"""
from __future__ import absolute_import, division, print_function
from Qt import QtGui, QtWidgets
from maya.app.general.mayaMixin import MayaQWidgetBaseMixin
import time
# -*- coding: utf-8 -*-
import sys
from PySide import QtCore, QtGui
class Ui_testGUI(object):
def setupUi(self, testGUI):
testGUI.setObjectName("testGUI")
testGUI.resize(310, 295)
testGUI.setStyleSheet("background-color: rgb(50, 50, 100);\n"
"color: rgb(255, 255, 255);")

基本手順

mkdir ~/.vim
cd ~/.vim
mkdir colors
git clone https://github.com/tomasr/molokai
mv molokai/colors/molokai.vim ~/.vim/colors/
vi ~/.vimrc
@dgovil
dgovil / mayaFileImportNodeQuery.py
Created January 21, 2017 04:20
Finding what nodes were imported from a Maya file
# First lets import our Maya command library
from maya import cmds
# Then we import our file. In this case I'm using a hardcoded value
# But notice the returnNewNodes parameter that tells it to give us back any imported nodes
# This may contain nodes we don't want
# So we'll need to shorten it down
nodes = cmds.file('C:/Users/dhruv/Documents/maya/controllerLibrary/bigdonut.ma',
i=True, returnNewNodes=True)
@lukas-h
lukas-h / license-badges.md
Last active April 28, 2025 11:10
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

// c# setWeights(),setWeight()
// http://ueta.hateblo.jp/entry/2015/08/24/102937
private void n(string name, ref MDagPath dp)
{
MSelectionList sellist = new MSelectionList();
MGlobal.getSelectionListByName( name, sellist );
sellist.getDagPath( 0 , dp );
}
@taikomatsu
taikomatsu / gist:98f77bf067bb9bfd4ffd
Last active August 29, 2015 14:23
Render sequence on Render View
# 何らかの理由でbatchレンダリングがうまくいかない、Maya HWだと何故かレンダリングが遅い、みたいなときに便利なスクリプト
# 連番をRender View上でレンダリングします
# Progress window付きでキャンセルすることが可能ですが、なぜかRender Viewの下に隠れてしまうので上手いことやらないとキャンセル出来ないので要注意
from pymel.core import *
from maya import mel
import math
preroll_start = None
s = int(playbackOptions(q=True, min=True)) # start frame
e = int(playbackOptions(q=True, max=True)) # end frame
@taikomatsu
taikomatsu / gist:99d34488eebe0225510f
Created June 22, 2015 07:25
Stick to closest uv
from maya import OpenMaya
from pymel.core import *
import math
class UvCoord(object):
def __init__(self, u, v):
self.u = u
self.v = v
def dist(self, uv):
@iberianpig
iberianpig / .ideavimrc
Created March 30, 2015 14:23
IdeaVIM用のキーマップ
"検索をファイルの先頭へ循環しない
set nowrapscan
"大文字小文字の区別なし
set ignorecase
"検索時に大文字を含んでいたら大/小を区別
set smartcase
"検索対象をハイライト