This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide.QtCore import * | |
from PySide.QtGui import * | |
import os, sys, re | |
class VrayMonitorConcept(QWidget): | |
def __init__(self): | |
super(VrayMonitorConcept, self).__init__() | |
self.ly = QVBoxLayout() | |
self.setLayout(self.ly) | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import af | |
import logging as _logging | |
logger = _logging.getLogger(__name__) | |
logger.setLevel(_logging.DEBUG) | |
class Monitor(object): | |
class CLASSTYPE: | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import MaxPlus, os | |
def get_all_bitmaps(): | |
res = MaxPlus.FPValue() | |
cmd = 'getClassInstances BitmapTexture' | |
success = MaxPlus.Core.EvalMAXScript(cmd, res) | |
if not success or res.Type == 44 or res.Type == 2091: | |
raise | |
max_bitmaps = res.Get() | |
return [max_bitmaps.GetItem(x) for x in range(max_bitmaps.GetCount())] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __init__(self): | |
# ставим количество колонок | |
self.table.setColumnCount(2) | |
# режим растяжения колонок | |
self.table.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents) | |
# мягкий скрол | |
self.table.setHorizontalScrollMode(QAbstractItemView.ScrollPerPixel) | |
# имена колонок | |
self.table.setHorizontalHeaderLabels(['CheckBox', 'Name']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def export_scene(job_data, set_project=True): | |
# получаем исходные переменные | |
scene = job_data['export_scene'] | |
local_root = job_data['local_root'] | |
export_root = job_data['export_root'] | |
# открываем сцену | |
openScene(scene) | |
# собираем параметры с ресурсами и референсы | |
parameters = getTextureParameters() + getCacheParameters() + getOtherParameters() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import MaxPlus | |
class Max(object): | |
""" | |
Wrapper for 3DMax Proejct | |
""" | |
@staticmethod | |
def SetProject(path): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Example | |
import houdini_localizer | |
new_files = houdini_localizer.HouLocalizer.localize_selected() | |
""" | |
# HouLocalizer template | |
import hou | |
import os | |
import itertools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Start independed process | |
Dont use env argument | |
""" | |
import os, subprocess | |
cmd = ['executable', 'arg1', 'arg2', 'arg3'] | |
devnull = open(os.devnull, 'wb') | |
DETACHED_PROCESS = 0x00000008 | |
subprocess.Popen(cmd, stdout=devnull, stderr=devnull, creationflags=DETACHED_PROCESS) |