Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcus Ottosson mottosso

View GitHub Profile
View CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
# include the project setting file
include($ENV{DEVKIT_LOCATION}/cmake/pluginEntry.cmake)
# specify project name
set(PROJECT_NAME ArrayData)
set(SOURCE_FILES
Sender.cpp
@mottosso
mottosso / ArrayPlug.cpp
Last active Aug 29, 2020
Maya API Example - Writing to an Array Plug
View ArrayPlug.cpp
/*
An example of writing to an array plug
Description
-----------------------------------------------------------
There are two ways of achieving this
1. Based on input, dynamically generate plugs in an array
2. Based on a connected array output, write to that
@mottosso
mottosso / CMakeLists.txt
Last active Aug 29, 2020
MyData - How to use MPxData with Maya
View CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
# include the project setting file
include($ENV{DEVKIT_LOCATION}/cmake/pluginEntry.cmake)
# specify project name
set(PROJECT_NAME MyData)
set(SOURCE_FILES
Sender.cpp
@mottosso
mottosso / README.md
Last active Jan 9, 2020
Parallel Evaluation in Maya 2018+
View README.md

An example of parallel evaluation in Maya 2018+

Scenes

  1. Independent hierarchies, with parent constraint

Usage

Files prefixed scene* generate nodes suitable for parallelism, profile* contain ways to measure performance. Each snippet of code is meant to be copy/pasted into the Script Editor and run.

View index.html
<table cellspacing="0" cellpadding="0" width="325" style="font-family:Arial;padding:20px">
<tbody style="color:rgb(151,153,155);font-size:13px;line-height:18px;letter-spacing:1px">
<tr>
<td>
<img width=50 src="https://user-images.githubusercontent.com/2152766/37761204-ef2d0f0c-2db0-11e8-8109-3a1ac2e08c99.png" class="CToWUd">
</td>
<td style="padding-top:10px">
<span style="text-transform:uppercase;color:rgb(0,163,173)">
MARCUS&nbsp;OTTOSSON
</span>
@mottosso
mottosso / Dock.py
Last active Jan 22, 2021 — forked from liorbenhorin/Simple_MayaDockingClass.py
Simple way to dock Qt widgets to Maya 2017+
View Dock.py
from maya import cmds, OpenMayaUi as omui
from Qt import QtWidgets, QtCore, QtCompat
def Dock(Widget, width=300, show=True):
"""Dock `Widget` into Maya
Arguments:
Widget (QWidget): Class
show (bool, optional): Whether to show the resulting dock once created
@mottosso
mottosso / MayaDockingClass.py
Created Jan 12, 2018 — forked from liorbenhorin/MayaDockingClass.py
Maya 2017 PySide2 Docking Qt QMainWindow
View MayaDockingClass.py
"""
This is what you need to do in order to get a qt window to dock next to maya channel box,
In all maya versions, including 2017 with PySide2
"""
__author__ = "liorbenhorin@gmail.com"
import sys
import os
import logging
import xml.etree.ElementTree as xml
View docker-compose.yml
redis:
image: redis
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=sentry
- POSTGRES_USER=sentry
volumes:
- /var/lib/postgresql/data
@mottosso
mottosso / README.md
Last active Jul 14, 2017 — forked from puppybits/docker-compose.yml
Sentry docker-compose
View README.md

As opposed to the parent gist, this version supports 8.5.x and above, and stores the database on the host drive as opposed to within the postgres container.

Usage

$ git clone https://gist.github.com/6a3cd5f9fad4e17e6c6ccbac801303fe.git sentry
$ . sentry/run.sh

Your server is accessible via http://localhost