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
# | |
# example Dockerfile for https://docs.docker.com/examples/postgresql_service/ | |
# | |
FROM ubuntu | |
# Add the PostgreSQL PGP key to verify their Debian packages. | |
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc | |
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 |
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
"""Store function on node | |
Usage example: | |
.. code-block:: | |
# Control node | |
ctrl_node_name = 'MY_SCRIPT_NODE' # if None, store on nuke.root() | |
# Define your functions and add them to the dictionary |
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
// Place your settings in this file to overwrite the default settings | |
{ | |
// Python, virtualenv (for workspace / project settings) | |
"python.pythonPath": "${workspaceRoot}/../../virtualenvs/vscode_base", | |
// "python.pythonPath": "${workspaceRoot}/../../virtualenvs/${workspaceRootFolderName}", | |
// "python.pythonPath": "${workspaceRoot}/.vscode/venv", | |
// Python, general |
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 maya.api.OpenMaya as om | |
import maya.api.OpenMayaUI as omui | |
import maya.cmds as cmds | |
# Maya Python API: | |
# http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__py_ref_index_html | |
def onPress(): | |
"""Take x,y from mouse click, convert into 3d world coordinates""" |
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 PySide import QtGui | |
def grab_widget(widget=None, filepath=None): | |
"""This is a test and is not proofed for production | |
Note: | |
See QPixmap members being obsolete in Qt5: | |
http://doc.qt.io/qt-5/qpixmap-obsolete.html | |
""" |
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 PySide2 import QtWidgets, QtCore | |
def _maya_main_window(): | |
"""Return Maya's main window""" | |
for obj in QtWidgets.qApp.topLevelWidgets(): | |
if obj.objectName() == 'MayaWindow': | |
return obj | |
raise RuntimeError('Could not find MayaWindow instance') |
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
$ docker run --rm -v $(pwd):/Qt.py mottosso/qt.py | |
/usr/bin/Xvfb | |
Initializing built-in extension Generic Event Extension | |
Initializing built-in extension SHAPE | |
Initializing built-in extension MIT-SHM | |
Initializing built-in extension XInputExtension | |
Initializing built-in extension XTEST | |
Initializing built-in extension BIG-REQUESTS | |
Initializing built-in extension SYNC |
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 __future__ import (print_function, division, unicode_literals, | |
absolute_import) | |
import os | |
import sys | |
from PySide2.QtCore import Slot, QMetaObject | |
from PySide2.QtUiTools import QUiLoader | |
from PySide2.QtWidgets import QApplication, QMainWindow, QMessageBox |
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
apt-get update | |
apt-get install wget make g++ libxext-dev | |
wget https://download.qt.io/archive/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz | |
cd qt-everywhere-opensource-src-4.8.6 | |
# Compilation options: http://doc.qt.io/qt-4.8/configure-options.html#cross-platform-options | |
./configure -fast | |
# Qt is now configured for building. Just run 'make'. |
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
brew install Qt4 | |
brew install openssl | |
brew install cmake | |
git clone https://github.com/PySide/pyside-setup.git --recurse-submodules | |
cd pyside-setup | |
# The following must be executed in a bash shell | |
python setup.py bdist_wheel --ignore-git --qmake=/usr/local/Cellar/qt/4.8.7_2/bin/qmake --openssl=/usr/local/Cellar/openssl/1.0.2h_1/bin/openssl --cmake=/usr/local/Cellar/cmake/3.5.2/bin/cmake |