Skip to content

Instantly share code, notes, and snippets.

View davidlatwe's full-sized avatar
:shipit:
Awesome

David Lai davidlatwe

:shipit:
Awesome
View GitHub Profile
@davidlatwe
davidlatwe / renderSetup_util.py
Last active June 1, 2023 10:12
Query renderSetup overrided attribute value without switching layer
import re
import itertools
from maya import cmds
from maya.app.renderSetup.model import selector as rs_selector
from maya.app.renderSetup.model import renderSettings as rs_render_settings
if float(cmds.about(version=True)) >= 2020.0:
_attr_highest_col = "containerHighest"
@davidlatwe
davidlatwe / daemon.md
Created November 15, 2018 08:45 — forked from andreif/daemon.md
A simple unix/linux daemon in Python

A simple unix/linux daemon in Python

Source: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

Access: http://web.archive.org/web/20131025230048/http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

by Sander Marechal

I've written a simple Python class for creating daemons on unix/linux systems. It was pieced together for various other examples, mostly corrections to various Python Cookbook articles and a couple of examples posted to the Python mailing lists. It has support for a pidfile to keep track of the process. I hope it's useful to someone.

@davidlatwe
davidlatwe / maya2016.sh
Created November 3, 2018 18:05 — forked from stenstorp/maya2016.sh
Installing Maya 2016 SP6 on Ubuntu 16.04 with Student License
#!/bin/bash
#Download Maya from here: http://download.autodesk.com/us/support/files/maya_2016_service_pack_6/Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz
#Get a student License from: http://www.autodesk.com/education/free-software/maya
#Log in and select maya 2016, your language and an OS. Either should work.
# !!!!!! IMPORTANT !!!!!!
# BEFORE RUNNING, REPLACE "USER" AND "HOME" AT THE BOTTOM OF THIS SCRIPT WITH YOUR USERNAME AND HOME FOLDER
# !!!!!! IMPORTANT !!!!!!
@davidlatwe
davidlatwe / README.md
Created November 3, 2018 11:46
Maya Dependency Install Script (CentOS 7.4)

From https://gitlab.com/snippets/1690538

Maya Dependency Install Script (CentOS 7.4)

This script is for installing all of the necessary dependencies for Maya 2018 on CentOS 7.4. This script was put together on a minimal install with just GNOME Desktop and the NVIDIA proprietary driver installed. There may or may not be some dependencies missing from this list. For a full list of packages that Maya uses, run ldd /usr/autodesk/maya2018/bin/maya.bin. Good luck!

@davidlatwe
davidlatwe / .coveragerc
Created September 9, 2018 07:31 — forked from mattbennett/.coveragerc
coverage subprocess
[run]
branch = True
source = .
@davidlatwe
davidlatwe / into_avalon.feature
Last active September 7, 2018 20:09
Avalon Config BDD Test Example - Energizing Avalon via Config
Feature: Energizing Avalon with Reveries
Scenario: Launch <DCC_App> with Reveries pipeline implemented
Given an environment that meets the Avalon's demand
When I initiate Avalon
And I create a project <PROJECT_NAME>
And I set my task: <SILO> - <ASSET> - <TASK>
And I launch <DCC_App>
Then <DCC_App> will be startup with Reveries pipeline
import time
def make_plugins():
import pyblish.api
class CollectLongRun(pyblish.api.ContextPlugin):
order = pyblish.api.CollectorOrder
def process(self, context):
@davidlatwe
davidlatwe / cefpython_pyside.py
Created August 14, 2018 10:18 — forked from mmolero/cefpython_pyside.py
CefBrowser using PySide on Windows/Linux/MacOX
from cefpython3 import cefpython
import sys, os
import platform
import ctypes
from PySide.QtGui import *
from PySide.QtCore import *
"""Avalanche-io C4 Framework - AssetID
Simplified from:
https://github.com/Avalanche-io/pyc4
"""
import hashlib
@davidlatwe
davidlatwe / fieldwalker2.py
Created August 6, 2018 05:04
montydb.fieldwalker, NodeTree implementation
# from collections import deque
class _NoVal(object):
def __repr__(self):
return "_NoVal()"
__solts__ = ()