Skip to content

Instantly share code, notes, and snippets.

View madoodia's full-sized avatar
🥰
I Love Programming...

Reza Aarabi madoodia

🥰
I Love Programming...
View GitHub Profile
@madoodia
madoodia / testThread.cpp
Created August 28, 2019 04:55
Sample of threading test
#include <iostream>
#include <thread>
#include <chrono>
#include <algorithm>
#include <vector>
#include <cassert>
void thFunc(int start, int end)
{
import sys
import os
from PySide import QtCore, QtGui
class HiddenMenu(QtGui.QWidget):
def __init__(self, parent=None):
super(HiddenMenu, self).__init__(parent)
// Advanced Programming
// Instructor: Ramtin Khosravi
// 2015-2016
// madoodia@gmail.com
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
# madoodia@gmail.com
# --------------------
import pyblish.api
from maya import cmds
# class ValidateKeyframesOnMesh(pyblish.api.InstancePlugin):
class ValidateKeyframesOnMesh(pyblish.api.Validator):
"""Validate keyframe on meshes
# madoodia@gmail.com
# --------------------
import pyblish.api
from maya import cmds, mel
def _get_has_history():
invalid = []
for node in cmds.ls(type='mesh'):
if len(cmds.listHistory(node)) > 1:
import pyblish.api
import nuke
class SelectMyInstance2(pyblish.api.Selector):
"""This is Documentation of SelectMyInstance2"""
hosts = ["nuke"] # Only compatible with Nuke
def process(self, context):
@madoodia
madoodia / play.py
Created May 10, 2015 07:31
playback test
def play_objects(self):
# 2. Act on every cloth based on cloth_set objectSet and uncheck Active checkbox from over to under
print "in play_objects method"
obj_list = cmds.sets('cloth_set', q=True)
for each in obj_list:
# deactive Active checkbox in its properties
shape = cmds.listRelatives(each)
self.isolate_toggling_objects(shape)
print each
cmds.setAttr(str(shape[0]) + '.active', 1)