Skip to content

Instantly share code, notes, and snippets.

View sonictk's full-sized avatar
🤞
build.bat and hope everything works

Siew Yi Liang sonictk

🤞
build.bat and hope everything works
View GitHub Profile
@sonictk
sonictk / generate_om2_autocompletions.py
Last active March 5, 2019 17:14
Generate Maya Python API 2.0 completion files
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Module generate_om2_autocompletions: This module allows for automatically
generating completions files for the Maya Python 2.0 API.
"""
import os
import sys
@sonictk
sonictk / generate_mari_autocompletions.py
Created October 3, 2015 07:15
Generate completion files for the Mari Python API
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Module generate_mari_autocompletions: This module allows for automatically
generating completions files for the Mari Python API.
"""
import shutil
import os
@sonictk
sonictk / OpenMaya.py
Created October 3, 2015 07:21
Maya Python API 2.0 autocompletions
This file has been truncated, but you can view the full file.
class MAngle(object):
"""
Manipulate angular data.
"""
def __init__(self, *args, **kwargs):
"""
x.__init__(...) initializes x; see help(type(x)) for signature
"""
@sonictk
sonictk / 0_reuse_code.js
Created October 23, 2015 08:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
This file has been truncated, but you can view the full file.
Projects:
Project: viewport_render_tool.vcxproj
Kind: {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}
Project: scripts.pyproj
Kind: Python
InterpreterId: 9a7a9026-48c1-4688-9d5d-e5699d47d074
InterpreterVersion: 3.3
StartupFile: C:\Programs\maya-viewport-render-plugin\scripts\viewport_render_tool.py
WorkingDirectory: .
2015-10-03T04:59:17: Start analysis
2015-10-03T04:59:17: [WARNING] Library was set explicitly - skipping path detection
2015-10-03T04:59:17: IncludeModulesFromModulePath = win32com
2015-10-03T04:59:17: Deleting 0 files
2015-10-03T04:59:17: Scraping builtin modules
2015-10-03T04:59:17: Command: C:\Programs\maya-viewport-render-plugin\venv\Scripts\python.exe "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.2\PythonScraper.py" C:\Programs\maya-viewport-render-plugin\venv\.ptvs\ "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.2\CompletionDB\\"
2015-10-03T04:59:17: Output
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.2\CompletionDB\__builtin__.idb
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.2\CompletionDB\_codecs.idb
import maya.OpenMaya as om
import pprint
import cProfile
selList = om.MSelectionList()
# selList.add('test_num_of_mesh_shells:pCubeShape1')
selList.add('test_num_of_mesh_shells:pSphereShape1')
# selList.add('theCubeShape')
@sonictk
sonictk / drawTextMayaVP1.py
Created May 25, 2017 06:58
Draw text in the Maya VP1 viewport
import maya.OpenMaya as om
import maya.OpenMayaUI as OpenMayaUI
def drawText(*args):
view = OpenMayaUI.M3dView.active3dView()
view.beginGL()
view.drawText('test text 2', om.MPoint(5, 5, 0.0, 1.0))
view.endGL()
// File: pjson.h - written by Rich Geldreich 2012 - License: Unlicense http://unlicense.org/
#ifndef PURPLE_JSON_H
#define PURPLE_JSON_H
#ifdef WIN32
#pragma once
#endif
#include <string>
#include <vector>
@sonictk
sonictk / .dir-locals.el
Created February 5, 2018 09:04
sample dir locals
(
(nil . ((tab-width . 4)
(indent-tabs-mode . nil)))
(c++-mode . ((c-basic-offset . 4)
(tab-width . 4)
(indent-tabs-mode . t)
(compile-command . "cmake --build . --config Debug --target INSTALL")
(cd-compile-directory . "C:\\Users\\sonictk/Git\\experiments\\opengl_test\\build")
(cc-search-directories . ("."