-
Single-line comments are started with
//
. Multi-line comments are started with/*
and ended with*/
. -
C# uses braces (
{
and}
) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,
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 FbxCommon | |
def fbx_trim_keys(scene, start, end, take_buffer=10): | |
""" | |
Uses the FBX SDK to remove unnecessary keys. | |
:param scene: FBX SDK scene class that hold data to edit | |
:param int start: start frame of animation keys to keep | |
:param int end: end frame of animation keys to keep |
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
from maya import OpenMaya as om | |
import numpy as np | |
from ctypes import c_float, c_double, c_int, c_uint | |
_CONVERT_DICT = { | |
om.MPointArray: (float, 4, c_double, om.MScriptUtil.asDouble4Ptr), | |
om.MFloatPointArray: (float, 4, c_float , om.MScriptUtil.asFloat4Ptr), | |
om.MVectorArray: (float, 3, c_double, om.MScriptUtil.asDouble3Ptr), | |
om.MFloatVectorArray: (float, 3, c_float , om.MScriptUtil.asFloat3Ptr), | |
om.MDoubleArray: (float, 1, c_double, om.MScriptUtil.asDoublePtr), |
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
# python api1.0 getWeight(),setWeights() | |
# http://ueta.hateblo.jp/entry/2015/08/24/102937 | |
import time | |
import maya.OpenMaya as OpenMaya | |
import maya.OpenMayaAnim as OpenMayaAnim | |
#_time = time.time | |
_time = time.clock |
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
# python api2.0 setWeights(),setWeight() | |
# http://ueta.hateblo.jp/entry/2015/08/24/102937 | |
import time | |
import maya.api.OpenMaya as OpenMaya2 | |
import maya.api.OpenMayaAnim as OpenMayaAnim2 | |
#_time = time.time | |
_time = time.clock |
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/python | |
# -*- coding: utf-8 -*- | |
""" | |
qtdbg.py | |
A simple PyQt output widget. | |
It's main use case is to serve as an output console, for debugging or | |
other purposes. | |
It provides a file-like interface for ease of integration with other | |
python features such as the logging module, on top of a slightly |