-
Notifications
You must be signed in to change notification settings - Fork 7
/
constant.py
49 lines (38 loc) · 861 Bytes
/
constant.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import os
from enum import Enum, IntEnum, unique
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
UI_DIR = os.path.join(PROJECT_ROOT, 'ui')
ICON_DIR = os.path.join(UI_DIR, 'icon')
# custom attribute short name long name mapping to be added on controllers
ATTRS = {
# quad foot
'flx': 'flex',
'swv': 'swivel',
'tap': 'tap',
'tip': 'tip',
'wr': 'wrist',
# biped foot
'fr': 'foot_roll',
'fb': 'foot_bank',
# fk ik switch
'sw': 'FK_IK'
}
@unique
class Side(Enum):
LEFT = 'l'
RIGHT = 'r'
MIDDLE = 'm'
@unique
class RigType(IntEnum):
BIPED = 0
QUADRUPED = 1
CHAIN = 2
CUSTOM = 3
@unique
class Direction(Enum):
Y_POSITIVE = [0, 1, 0]
Y_NEGATIVE = [0, -1, 0]
X_POSITIVE = [1, 0, 0]
X_NEGATIVE = [-1, 0, 0]
Z_POSITIVE = [0, 0, 1]
Z_NEGATIVE = [0, 0, -1]