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
""" | |
ASGI entrypoint. Configures Django and then runs the application | |
defined in the ASGI_APPLICATION setting. | |
""" | |
import os | |
import django | |
from channels.routing import get_default_application | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "main.settings") |
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
upstream project_stream { | |
server $APP_NAME:$APP_PORT; | |
} | |
server { | |
listen 80; | |
server_name $PROJECT_HOST; | |
root /data/src; | |
index index.html index.htm; |
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 formfield_for_dbfield(self, db_field, **kwargs): | |
field = super(AuthorAdmin, self).formfield_for_dbfield(db_field, **kwargs) | |
if db_field.name == 'user': | |
field.queryset = GenericUser.objects.all().order_by('email') | |
return field |
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.QtGui import * | |
from PySide.QtCore import * | |
from shiboken import wrapInstance as wrp | |
qApp = QApplication.instance() | |
geo = qApp.desktop().screenGeometry() | |
#xRes = geo.width() | |
yRes = geo.height() | |
def getScreenPos(dagPath): | |
nx, ny = getScreenSpace(dagPath.inclusiveMatrix()) |
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 re, json, itertools | |
path = 'log.txt' | |
text = open(path).readlines() | |
data = [ json.loads(re.findall(r".+?\d{3}\s-\s(.*)$", x.strip())[0]) for x in text] | |
rules = list(set([r.strip() for r in itertools.chain(*[x['rule'].split(',') for x in data])])) | |
rules_data = {r:[] for r in rules} | |
for rule in rules: |
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
""" | |
WARNING!!! | |
1. Select mesh with BlendShape | |
2. Select file with RIGHT weight map | |
3. Start script | |
""" | |
from pymel.core import * | |
from PySide2.QtGui import * | |
from PySide2.QtCore import * |
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 pymel.core import * | |
src, trg = selected() | |
src_bs = src.getShape().inputs(type='blendShape')[0] | |
trg_bs = trg.getShape().inputs(type='blendShape')[0] | |
src_targets = [x.split('|')[-1] for x in src_bs.getTarget()] | |
trg_targets = [x.split('|')[-1] for x in trg_bs.getTarget()] |
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
''' | |
1. Выделить меш с блендшейпами первым | |
2. Выделить итоговый врапленный меш вторым | |
3. Запустить скрипт | |
''' | |
from pymel.core import * | |
def msg(): | |
inViewMessage( amg='1. Select source mesh with blend shapes\n2. Select Wrapped mesh\n3. Start Script', pos='midCenter', fade=True, fst=10000) |
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 pymel.core import * | |
source, result = selected() | |
source = source.getShape() | |
bs = source.inMesh.inputs()[0] | |
for i in range(bs.getWeightCount()): | |
bs.setWeight(i, 0) | |
out_parent = createNode('transform', name=result.name()+'_blendShapes') |
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
node = hou.pwd() | |
geo = node.geometry() | |
pos_array = [] | |
index_array = [] | |
for pt in geo.iterPoints(): | |
pos_array.append(pt.position()) | |
index_array.append(pt.number()) | |
poly_array = [] |