Skip to content

Instantly share code, notes, and snippets.

View JanPhKoch's full-sized avatar

Jan-Philipp Koch JanPhKoch

View GitHub Profile
@Kif11
Kif11 / obj_in_frust.py
Created June 7, 2017 17:11
Maya script to find if object located within camera frustum
import maya.cmds as cmds
import maya.OpenMaya as OpenMaya
import math
# Find if object located within camera frustum
# Usage:
# from obj_in_frust import in_frustum
# in_frustum('camera1', 'pCube1')
class Plane(object):
@mrmurphy
mrmurphy / gist:2974955
Created June 22, 2012 20:20
Import all references from Maya
import pymel.core as pm
def importAllReferences():
print("Importing all references...")
done = False
while (done == False and (len(pm.listReferences()) != 0)):
refs = pm.listReferences()
print("Importing " + str(len(refs)) + " references.")
for ref in refs:
if ref.isLoaded():
done = False