Skip to content

Instantly share code, notes, and snippets.

View SatishGodaPearl's full-sized avatar

Satish Goda SatishGodaPearl

View GitHub Profile
@SatishGodaPearl
SatishGodaPearl / blender28_run_qt_ui.py
Created January 5, 2020 20:53 — forked from BigRoy/blender28_run_qt_ui.py
Simple example of running a Qt interface in Blender 2.8 without blocking Blender.
import bpy
from PyQt5 import QtWidgets
class QtModalOperator(bpy.types.Operator):
"""A base class for Operators that run a Qt interface."""
def modal(self, context, event):
if self._app:
@SatishGodaPearl
SatishGodaPearl / obj_in_frust.py
Created October 11, 2019 00:03 — forked from Kif11/obj_in_frust.py
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):
@SatishGodaPearl
SatishGodaPearl / camel_case_to_snake_case.py
Created June 26, 2019 21:28 — forked from jaytaylor/camel_case_to_snake_case.py
Convert camel-case to snake-case in python.
#!/usr/bin/env python
"""
Convert camel-case to snake-case in python.
e.g.: CamelCase -> snake_case
Relevant StackOverflow question: http://stackoverflow.com/a/1176023/293064
"""
@SatishGodaPearl
SatishGodaPearl / export_nodes_and_store_node_data.py
Created March 19, 2019 17:30 — forked from fredrikaverpil/export_nodes_and_store_node_data.py
Export and re-assign shaders, nodes and node data #maya
import maya.cmds as cmds
def getAttributes(object):
attributes = cmds.listAttr(object)
for attribute in attributes:
try:
print attribute + ' = ' + str(cmds.getAttr(object + '.' + attribute))
except:
pass
@SatishGodaPearl
SatishGodaPearl / shelfBase.py
Created January 12, 2019 08:45 — forked from vshotarov/shelfBase.py
Maya base class for building custom shelves.
import maya.cmds as mc
def _null(*args):
pass
class _shelf():
'''A simple class to build shelves in maya. Since the build method is empty,
it should be extended by the derived class to build the necessary shelf elements.