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
substitutions: | |
devicename: ld2450 | |
upper_devicename: "Hi-Link LD2450" | |
esphome: | |
name: wd-presense | |
friendly_name: wd_presense | |
includes: | |
- ld2450_uart.h |
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 PyQt5.QtCore import * | |
from PyQt5.QtGui import * | |
from PyQt5.QtWidgets import * | |
import sys | |
import pywinusb.hid as hid | |
from functools import partial | |
import base64 | |
import os | |
import re | |
import win32gui |
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 time | |
from PyQt5.QtCore import * | |
from PyQt5.QtGui import * | |
from PyQt5.QtWidgets import * | |
import sys | |
import pywinusb.hid as hid | |
from functools import partial | |
import base64 | |
import os |
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. Open src.c in lang shift lib and add this function right next to the 'lang_activate' function | |
######################################## | |
void lang_toggle(int externalLang) { | |
if (lang_current == lang_should_be && timer_read() - lang_timer >= 200) { | |
if (externalLang == 0){ | |
layer_off(2); | |
} else if (externalLang == 1){ | |
layer_on(2); |
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 maya.api.OpenMaya as om2 | |
import maya.cmds as mc | |
import math | |
import maya.mel as mel | |
''' | |
select two main vertices | |
and then select child vertices | |
that you need to align | |
in line between the main ones |
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 maya.api.OpenMaya as om2 | |
import math | |
import maya.cmds as mc | |
import maya.mel as mel | |
def getDG( nType, getShape = False, upstream = True, pluglevel = True, sel=[] ): | |
kPlugLevel = pluglevel | |
direction = om2.MItDependencyGraph.kUpstream if upstream else om2.MItDependencyGraph.kDownstream | |
nodes = [] | |
if len( sel ) == 0: |
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
''' | |
Save the file to Maya script folder and then just | |
run this three-line code in script editor to call the UI | |
import maya.cmds as mc | |
import containerAnim | |
containerAnim.containerAnim().UI() | |
''' | |
import maya.cmds as mc |
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
''' | |
Select any object and run the script, it will select any node, specified in the list of the "getDG" nType array | |
Some api node type examples: | |
Camera = camera | |
Parent Constraint = parentConstraint | |
Point Constraint = pointConstraint | |
Orient Constraint = orientConstraint | |
Aim Constraint = aimConstraint | |
Scale Constraint = scaleConstraint | |
Skin Cluster = skinCluster |
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 maya.cmds as mc | |
locResult = mc.promptDialog( title='Insert Locators', message='Locator count:', button=['OK', 'Cancel'], defaultButton='OK', cancelButton='Cancel', dismissString='Cancel') | |
if locResult == 'OK': | |
locCount = mc.promptDialog( q=1, text=1) | |
if not locCount or not int(locCount) : | |
locCount = 1 | |
sel = mc.ls( sl=1 ) | |
for s in sel: | |
pos = mc.xform( s, q=1, t=1, ws=1 ) | |
for l in xrange( int( locCount ) ): |
NewerOlder