pyjallib 0.1.8__py3-none-any.whl → 0.1.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyjallib/__init__.py +1 -1
- pyjallib/max/autoClavicle.py +85 -42
- pyjallib/max/bone.py +14 -7
- pyjallib/max/constraint.py +29 -38
- pyjallib/max/groinBone.py +51 -20
- pyjallib/max/header.py +4 -6
- pyjallib/max/hip.py +366 -0
- pyjallib/max/twistBone.py +1 -1
- pyjallib/max/volumePreserveBone.py +64 -26
- pyjallib/p4module.py +488 -0
- pyjallib/perforce.py +446 -653
- {pyjallib-0.1.8.dist-info → pyjallib-0.1.9.dist-info}/METADATA +1 -1
- {pyjallib-0.1.8.dist-info → pyjallib-0.1.9.dist-info}/RECORD +14 -12
- {pyjallib-0.1.8.dist-info → pyjallib-0.1.9.dist-info}/WHEEL +0 -0
pyjallib/__init__.py
CHANGED
pyjallib/max/autoClavicle.py
CHANGED
@@ -8,13 +8,7 @@
|
|
8
8
|
|
9
9
|
from pymxs import runtime as rt
|
10
10
|
|
11
|
-
|
12
|
-
from .name import Name
|
13
|
-
from .anim import Anim
|
14
|
-
from .helper import Helper
|
15
|
-
from .bone import Bone
|
16
|
-
from .constraint import Constraint
|
17
|
-
from .bip import Bip
|
11
|
+
from .header import jal
|
18
12
|
|
19
13
|
|
20
14
|
class AutoClavicle:
|
@@ -24,7 +18,7 @@ class AutoClavicle:
|
|
24
18
|
3ds Max의 기능들을 pymxs API를 통해 제어합니다.
|
25
19
|
"""
|
26
20
|
|
27
|
-
def __init__(self
|
21
|
+
def __init__(self):
|
28
22
|
"""
|
29
23
|
클래스 초기화
|
30
24
|
|
@@ -36,14 +30,19 @@ class AutoClavicle:
|
|
36
30
|
constraintService: 제약 서비스 (제공되지 않으면 새로 생성)
|
37
31
|
bipService: Biped 서비스 (제공되지 않으면 새로 생성)
|
38
32
|
"""
|
39
|
-
self.name =
|
40
|
-
self.anim =
|
41
|
-
self.helper =
|
42
|
-
self.bone =
|
43
|
-
self.const =
|
44
|
-
self.bip =
|
45
|
-
|
46
|
-
self.
|
33
|
+
self.name = jal.name
|
34
|
+
self.anim = jal.anim
|
35
|
+
self.helper = jal.helper
|
36
|
+
self.bone = jal.bone
|
37
|
+
self.const = jal.constraint
|
38
|
+
self.bip = jal.bip
|
39
|
+
|
40
|
+
self.boneSize = 2.0
|
41
|
+
self.clavicle = None
|
42
|
+
self.upperArm = None
|
43
|
+
self.liftScale = 0.8
|
44
|
+
self.genBones = []
|
45
|
+
self.genHelpers = []
|
47
46
|
|
48
47
|
def create_bones(self, inClavicle, inUpperArm, liftScale=0.8):
|
49
48
|
"""
|
@@ -57,6 +56,15 @@ class AutoClavicle:
|
|
57
56
|
Returns:
|
58
57
|
생성된 자동 쇄골 뼈대 배열
|
59
58
|
"""
|
59
|
+
if not rt.isValidNode(inClavicle) or not rt.isValidNode(inUpperArm):
|
60
|
+
return False
|
61
|
+
|
62
|
+
self.clavicle = inClavicle
|
63
|
+
self.upperArm = inUpperArm
|
64
|
+
self.liftScale = liftScale
|
65
|
+
self.genBones = []
|
66
|
+
self.genHelpers = []
|
67
|
+
|
60
68
|
# 쇄골과 상완 사이의 거리 계산
|
61
69
|
clavicleLength = rt.distance(inClavicle, inUpperArm)
|
62
70
|
|
@@ -75,11 +83,12 @@ class AutoClavicle:
|
|
75
83
|
end=True,
|
76
84
|
delPoint=True,
|
77
85
|
parent=False,
|
78
|
-
size=self.
|
86
|
+
size=self.boneSize
|
79
87
|
)
|
80
88
|
autoClavicleBones[0].transform = inClavicle.transform
|
81
89
|
self.anim.move_local(autoClavicleBones[0], clavicleLength/2.0, 0.0, 0.0)
|
82
90
|
autoClavicleBones[0].parent = inClavicle
|
91
|
+
self.genBones.extend(autoClavicleBones)
|
83
92
|
|
84
93
|
# LookAt 설정
|
85
94
|
ikGoal = self.helper.create_point(autoClavicleName, boxToggle=False, crossToggle=True)
|
@@ -89,21 +98,25 @@ class AutoClavicle:
|
|
89
98
|
autClavicleLookAtConst.upnode_world = False
|
90
99
|
autClavicleLookAtConst.pickUpNode = inClavicle
|
91
100
|
autClavicleLookAtConst.lookat_vector_length = 0.0
|
101
|
+
self.genHelpers.append(ikGoal)
|
92
102
|
|
93
103
|
# 회전 헬퍼 포인트 생성
|
94
104
|
autoClavicleRotHelper = self.helper.create_point(self.name.replace_name_part("Type", autoClavicleName, "Rot"))
|
95
105
|
autoClavicleRotHelper.transform = autoClavicleBones[0].transform
|
96
106
|
autoClavicleRotHelper.parent = inClavicle
|
107
|
+
self.genHelpers.append(autoClavicleRotHelper)
|
97
108
|
|
98
109
|
# 타겟 헬퍼 포인트 생성 (쇄골과 상완용)
|
99
110
|
rotTargetClavicle = self.helper.create_point(self.name.replace_name_part("Type", autoClavicleName, "T"))
|
100
111
|
rotTargetClavicle.transform = inClavicle.transform
|
101
112
|
self.anim.move_local(rotTargetClavicle, clavicleLength, 0.0, 0.0)
|
113
|
+
self.genHelpers.append(rotTargetClavicle)
|
102
114
|
|
103
115
|
rotTargetUpperArm = self.helper.create_point(self.name.replace_name_part("Type", autoClavicleName, "T"))
|
104
116
|
rotTargetUpperArm.name = self.name.add_suffix_to_real_name(rotTargetUpperArm.name, "UArm")
|
105
117
|
rotTargetUpperArm.transform = inUpperArm.transform
|
106
118
|
self.anim.move_local(rotTargetUpperArm, (clavicleLength/2.0)*liftScale, 0.0, 0.0)
|
119
|
+
self.genHelpers.append(rotTargetUpperArm)
|
107
120
|
|
108
121
|
# 부모 설정
|
109
122
|
rotTargetClavicle.parent = inClavicle
|
@@ -121,7 +134,7 @@ class AutoClavicle:
|
|
121
134
|
|
122
135
|
return autoClavicleBones
|
123
136
|
|
124
|
-
def get_bones(self
|
137
|
+
def get_bones(self):
|
125
138
|
"""
|
126
139
|
자동 쇄골 뼈를 가져옵니다.
|
127
140
|
|
@@ -132,19 +145,18 @@ class AutoClavicle:
|
|
132
145
|
Returns:
|
133
146
|
자동 쇄골 뼈대 배열
|
134
147
|
"""
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
return returnVal
|
148
|
+
if len(self.genBones) == 0:
|
149
|
+
return []
|
150
|
+
|
151
|
+
validResults = []
|
152
|
+
for item in self.genBones:
|
153
|
+
validResults.append(rt.isValidNode(item))
|
154
|
+
if not all(validResults):
|
155
|
+
return []
|
156
|
+
|
157
|
+
return self.genBones
|
146
158
|
|
147
|
-
def get_helpers(self
|
159
|
+
def get_helpers(self):
|
148
160
|
"""
|
149
161
|
자동 쇄골 헬퍼를 가져옵니다.
|
150
162
|
|
@@ -155,15 +167,46 @@ class AutoClavicle:
|
|
155
167
|
Returns:
|
156
168
|
자동 쇄골 헬퍼 배열
|
157
169
|
"""
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
+
if len(self.genHelpers) == 0:
|
171
|
+
return []
|
172
|
+
|
173
|
+
validResults = []
|
174
|
+
for item in self.genHelpers:
|
175
|
+
validResults.append(rt.isValidNode(item))
|
176
|
+
if not all(validResults):
|
177
|
+
return []
|
178
|
+
|
179
|
+
return self.genHelpers
|
180
|
+
|
181
|
+
def delete(self):
|
182
|
+
"""
|
183
|
+
자동 쇄골 뼈와 헬퍼를 삭제합니다.
|
184
|
+
|
185
|
+
Args:
|
186
|
+
None
|
187
|
+
|
188
|
+
Returns:
|
189
|
+
None
|
190
|
+
"""
|
191
|
+
rt.delete(self.genBones)
|
192
|
+
rt.delete(self.genHelpers)
|
193
|
+
|
194
|
+
self.genBones = []
|
195
|
+
self.genHelpers = []
|
196
|
+
|
197
|
+
def update_liftScale(self, liftScale=0.8):
|
198
|
+
"""
|
199
|
+
자동 쇄골 뼈의 들어올림 스케일을 업데이트합니다.
|
200
|
+
|
201
|
+
Args:
|
202
|
+
liftScale: 들어올림 스케일 (기본값: 0.8)
|
203
|
+
|
204
|
+
Returns:
|
205
|
+
None
|
206
|
+
"""
|
207
|
+
if len(self.genBones) == 0:
|
208
|
+
return False
|
209
|
+
|
210
|
+
self.delete()
|
211
|
+
self.create_bones(self.clavicle, self.upperArm, liftScale=liftScale)
|
212
|
+
|
pyjallib/max/bone.py
CHANGED
@@ -712,7 +712,7 @@ class Bone:
|
|
712
712
|
|
713
713
|
return True
|
714
714
|
|
715
|
-
def create_skin_bone(self, inBoneArray, skipNub=True, mesh=True, link=True, skinBoneBaseName="
|
715
|
+
def create_skin_bone(self, inBoneArray, skipNub=True, mesh=True, link=True, skinBoneBaseName=""):
|
716
716
|
"""
|
717
717
|
스킨 뼈대 생성.
|
718
718
|
|
@@ -731,11 +731,18 @@ class Bone:
|
|
731
731
|
skinBonePushAmount = -0.02
|
732
732
|
returnBones = []
|
733
733
|
|
734
|
+
definedSkinBoneBaseName = self.name.get_name_part_value_by_description("Base", "SkinBone")
|
735
|
+
if skinBoneBaseName == "":
|
736
|
+
if definedSkinBoneBaseName == "":
|
737
|
+
skinBoneBaseName = "b"
|
738
|
+
else:
|
739
|
+
skinBoneBaseName = definedSkinBoneBaseName
|
740
|
+
|
734
741
|
for i in range(len(inBoneArray)):
|
735
|
-
skinBoneName = self.name.
|
742
|
+
skinBoneName = self.name.replace_name_part("Base", inBoneArray[i].name, skinBoneBaseName)
|
736
743
|
skinBoneName = self.name.replace_filtering_char(skinBoneName, skinBoneFilteringChar)
|
737
744
|
|
738
|
-
skinBone = self.create_nub_bone("
|
745
|
+
skinBone = self.create_nub_bone(f"{skinBoneBaseName}_TempSkin", 2)
|
739
746
|
skinBone.name = skinBoneName
|
740
747
|
skinBone.wireColor = rt.Color(255, 88, 199)
|
741
748
|
skinBone.transform = inBoneArray[i].transform
|
@@ -753,7 +760,7 @@ class Bone:
|
|
753
760
|
|
754
761
|
skinBone.boneEnable = True
|
755
762
|
skinBone.renderable = False
|
756
|
-
skinBone.boneScaleType = rt.Name("
|
763
|
+
skinBone.boneScaleType = rt.Name("None")
|
757
764
|
|
758
765
|
bones.append(skinBone)
|
759
766
|
|
@@ -771,7 +778,7 @@ class Bone:
|
|
771
778
|
|
772
779
|
if skipNub:
|
773
780
|
for item in bones:
|
774
|
-
if not rt.matchPattern(item.name, pattern=("*" + self.name.
|
781
|
+
if not rt.matchPattern(item.name, pattern=("*" + self.name.get_name_part_value_by_description("Nub", "Nub"))):
|
775
782
|
returnBones.append(item)
|
776
783
|
else:
|
777
784
|
rt.delete(item)
|
@@ -782,7 +789,7 @@ class Bone:
|
|
782
789
|
|
783
790
|
return returnBones
|
784
791
|
|
785
|
-
def create_skin_bone_from_bip(self, inBoneArray, skipNub=True, mesh=False, link=True, skinBoneBaseName="
|
792
|
+
def create_skin_bone_from_bip(self, inBoneArray, skipNub=True, mesh=False, link=True, skinBoneBaseName=""):
|
786
793
|
"""
|
787
794
|
바이페드 객체에서 스킨 뼈대 생성.
|
788
795
|
|
@@ -806,7 +813,7 @@ class Bone:
|
|
806
813
|
|
807
814
|
return returnSkinBones
|
808
815
|
|
809
|
-
def create_skin_bone_from_bip_for_unreal(self, inBoneArray, skipNub=True, mesh=False, link=True, skinBoneBaseName="
|
816
|
+
def create_skin_bone_from_bip_for_unreal(self, inBoneArray, skipNub=True, mesh=False, link=True, skinBoneBaseName=""):
|
810
817
|
"""
|
811
818
|
언리얼 엔진용 바이페드 객체에서 스킨 뼈대 생성.
|
812
819
|
|
pyjallib/max/constraint.py
CHANGED
@@ -233,6 +233,8 @@ class Constraint:
|
|
233
233
|
# 마지막 타겟에 특정 가중치 적용
|
234
234
|
targetNum = targetPosConst.getNumTargets()
|
235
235
|
targetPosConst.SetWeight(targetNum, inWeight)
|
236
|
+
|
237
|
+
return targetPosConst
|
236
238
|
|
237
239
|
def assign_pos_xyz(self, inObj):
|
238
240
|
"""
|
@@ -443,6 +445,8 @@ class Constraint:
|
|
443
445
|
# 마지막 타겟에 특정 가중치 적용
|
444
446
|
targetNum = targetRotConstraint.getNumTargets()
|
445
447
|
targetRotConstraint.SetWeight(targetNum, inWeight)
|
448
|
+
|
449
|
+
return targetRotConstraint
|
446
450
|
|
447
451
|
def assign_euler_xyz(self, inObj):
|
448
452
|
"""
|
@@ -609,6 +613,8 @@ class Constraint:
|
|
609
613
|
rot_list = self.get_rot_list_controller(inObj)
|
610
614
|
rt.setPropertyController(rot_list, "Available", targetRotConstraint)
|
611
615
|
rot_list.setActive(rot_list.count)
|
616
|
+
|
617
|
+
return targetRotConstraint
|
612
618
|
|
613
619
|
def assign_rot_const_scripted(self, inObj, inTarget):
|
614
620
|
"""
|
@@ -635,32 +641,19 @@ class Constraint:
|
|
635
641
|
rot_list.setActive(rot_list.count)
|
636
642
|
|
637
643
|
# 헬퍼 객체 이름 생성
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
print(f"rotPointName: {rotPointName}, rotMeasurePointName: {rotMeasurePointName}, rotExpName: {rotExpName}")
|
647
|
-
else:
|
648
|
-
# name 서비스가 없는 경우 기본 이름 사용
|
649
|
-
base_name = rt.getProperty(inObj, "name")
|
650
|
-
rotPointName = f"dum_{base_name}"
|
651
|
-
rotMeasurePointName = f"dum_{base_name}_01"
|
652
|
-
rotExpName = f"exp_{base_name}_0"
|
644
|
+
rotPointName = self.name.replace_Type(inObj.name, self.name.get_dummy_value())
|
645
|
+
rotMeasurePointName = self.name.increase_index(rotPointName, 1)
|
646
|
+
rotExpName = self.name.replace_Type(inObj.name, self.name.get_exposeTm_value())
|
647
|
+
rotExpName = self.name.replace_Index(rotExpName, "0")
|
648
|
+
|
649
|
+
print(f"dumStr: {self.name.get_dummy_value()}")
|
650
|
+
print(f"exposeTmStr: {self.name.get_exposeTm_value()}")
|
651
|
+
print(f"rotPointName: {rotPointName}, rotMeasurePointName: {rotMeasurePointName}, rotExpName: {rotExpName}")
|
653
652
|
|
654
653
|
# 헬퍼 객체 생성
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
rotExpPoint = rt.ExposeTm(name=rotExpName, size=3, box=False, cross=True, wirecolor=rt.Color(14, 255, 2))
|
659
|
-
else:
|
660
|
-
# 직접 헬퍼 객체 생성
|
661
|
-
rotPoint = rt.Point(name=rotPointName, size=2, box=True, cross=False)
|
662
|
-
rotMeasuerPoint = rt.Point(name=rotMeasurePointName, size=3, box=True, cross=False)
|
663
|
-
rotExpPoint = rt.ExposeTm(name=rotExpName, size=3, box=False, cross=True, wirecolor=rt.Color(14, 255, 2))
|
654
|
+
rotPoint = self.helper.create_point(rotPointName, size=2, boxToggle=True, crossToggle=False)
|
655
|
+
rotMeasuerPoint = self.helper.create_point(rotMeasurePointName, size=3, boxToggle=True, crossToggle=False)
|
656
|
+
rotExpPoint = rt.ExposeTm(name=rotExpName, size=3, box=False, cross=True, wirecolor=rt.Color(14, 255, 2))
|
664
657
|
|
665
658
|
# 초기 변환 설정
|
666
659
|
rt.setProperty(rotPoint, "transform", rt.getProperty(inObj, "transform"))
|
@@ -710,22 +703,20 @@ class Constraint:
|
|
710
703
|
targetObjArray = inTarget
|
711
704
|
|
712
705
|
# 객체 이름 생성
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
lookAtExpPointName = self.name.replace_Index(lookAtExpPointName, "0")
|
706
|
+
objName = self.name.get_string(oriObj.name)
|
707
|
+
indexVal = self.name.get_index_as_digit(oriObj.name)
|
708
|
+
indexNum = 0 if indexVal is False else indexVal
|
709
|
+
dummyName = self.name.add_prefix_to_real_name(objName, self.name.get_dummy_value())
|
710
|
+
|
711
|
+
lookAtPointName = self.name.replace_Index(dummyName, str(indexNum))
|
712
|
+
lookAtMeasurePointName = self.name.replace_Index(dummyName, str(indexNum+1))
|
713
|
+
lookAtExpPointName = dummyName + self.name.get_exposeTm_value()
|
714
|
+
lookAtExpPointName = self.name.replace_Index(lookAtExpPointName, "0")
|
723
715
|
|
724
716
|
# 헬퍼 객체 생성
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
lookAtExpPoint = rt.ExposeTm(name=lookAtExpPointName, size=3, box=False, cross=True, wirecolor=rt.Color(14, 255, 2))
|
717
|
+
lookAtPoint = self.helper.create_point(lookAtPointName, size=2, boxToggle=True, crossToggle=False)
|
718
|
+
lookAtMeasurePoint = self.helper.create_point(lookAtMeasurePointName, size=3, boxToggle=True, crossToggle=False)
|
719
|
+
lookAtExpPoint = rt.ExposeTm(name=lookAtExpPointName, size=3, box=False, cross=True, wirecolor=rt.Color(14, 255, 2))
|
729
720
|
|
730
721
|
# 초기 변환 설정
|
731
722
|
rt.setProperty(lookAtPoint, "transform", rt.getProperty(oriObj, "transform"))
|
pyjallib/max/groinBone.py
CHANGED
@@ -7,14 +7,7 @@
|
|
7
7
|
|
8
8
|
from pymxs import runtime as rt
|
9
9
|
|
10
|
-
|
11
|
-
from .name import Name
|
12
|
-
from .anim import Anim
|
13
|
-
from .constraint import Constraint
|
14
|
-
from .bip import Bip
|
15
|
-
from .bone import Bone
|
16
|
-
from .helper import Helper
|
17
|
-
from .twistBone import TwistBone
|
10
|
+
from .header import jal
|
18
11
|
|
19
12
|
class GroinBone:
|
20
13
|
"""
|
@@ -22,7 +15,7 @@ class GroinBone:
|
|
22
15
|
3DS Max에서 고간 부 본을 생성하고 관리하는 기능을 제공합니다.
|
23
16
|
"""
|
24
17
|
|
25
|
-
def __init__(self
|
18
|
+
def __init__(self):
|
26
19
|
"""
|
27
20
|
클래스 초기화.
|
28
21
|
|
@@ -32,16 +25,20 @@ class GroinBone:
|
|
32
25
|
constService: 제약 서비스 (제공되지 않으면 새로 생성)
|
33
26
|
bipService: 바이페드 서비스 (제공되지 않으면 새로 생성)
|
34
27
|
"""
|
35
|
-
self.name =
|
36
|
-
self.anim =
|
28
|
+
self.name = jal.name
|
29
|
+
self.anim = jal.anim
|
37
30
|
# Ensure dependent services use the potentially newly created instances
|
38
|
-
self.const =
|
39
|
-
self.bip =
|
40
|
-
self.bone =
|
41
|
-
self.twistBone =
|
42
|
-
self.helper =
|
31
|
+
self.const = jal.constraint
|
32
|
+
self.bip = jal.bip
|
33
|
+
self.bone = jal.bone
|
34
|
+
self.twistBone = jal.twistBone
|
35
|
+
self.helper = jal.helper
|
36
|
+
|
37
|
+
self.bipObj = None
|
38
|
+
self.genBones = []
|
39
|
+
self.genHelpers = []
|
43
40
|
|
44
|
-
def create_bone(self, inObj):
|
41
|
+
def create_bone(self, inObj, inPelvisWeight=40.0, inThighWeight=60.0):
|
45
42
|
"""
|
46
43
|
고간 부 본을 생성하는 메소드.
|
47
44
|
|
@@ -57,6 +54,7 @@ class GroinBone:
|
|
57
54
|
return False
|
58
55
|
|
59
56
|
bipObj = self.bip.get_com(inObj)
|
57
|
+
self.bipObj = bipObj
|
60
58
|
|
61
59
|
lThigh = self.bip.get_grouped_nodes(inObj, "lLeg")[0]
|
62
60
|
rThigh = self.bip.get_grouped_nodes(inObj, "rLeg")[0]
|
@@ -75,16 +73,49 @@ class GroinBone:
|
|
75
73
|
self.anim.rotate_local(pelvisHelper, 0, 0, -90)
|
76
74
|
pelvisHelper.parent = pelvis
|
77
75
|
self.helper.set_shape_to_box(pelvisHelper)
|
76
|
+
self.genHelpers.append(pelvisHelper)
|
78
77
|
|
79
78
|
groinBones = self.bone.create_simple_bone(3.0, bipObj.name +" Groin 00", size=2)
|
80
79
|
groinBones[0].transform = pelvisHelper.transform
|
81
80
|
groinBones[0].parent = pelvis
|
81
|
+
for groinBone in groinBones:
|
82
|
+
self.genBones.append(groinBone)
|
82
83
|
|
83
84
|
self.const.assign_rot_const_multi(groinBones[0], [pelvisHelper, lThigh, rThigh])
|
84
85
|
rotConst = self.const.get_rot_list_controller(groinBones[0])[1]
|
85
|
-
rotConst.setWeight(1,
|
86
|
-
rotConst.setWeight(2,
|
87
|
-
rotConst.setWeight(3,
|
86
|
+
rotConst.setWeight(1, inPelvisWeight)
|
87
|
+
rotConst.setWeight(2, inThighWeight/2.0)
|
88
|
+
rotConst.setWeight(3, inThighWeight/2.0)
|
89
|
+
|
90
|
+
def delete(self):
|
91
|
+
"""
|
92
|
+
생성된 고간 부 본과 헬퍼를 삭제하는 메소드.
|
93
|
+
|
94
|
+
Returns:
|
95
|
+
None
|
96
|
+
"""
|
97
|
+
rt.delete(self.genBones)
|
98
|
+
rt.delete(self.genHelpers)
|
99
|
+
|
100
|
+
self.genBones = []
|
101
|
+
self.genHelpers = []
|
102
|
+
|
103
|
+
def update_weight(self, inPelvisWeight=40.0, inThighWeight=60.0):
|
104
|
+
"""
|
105
|
+
고간 부 본의 가중치를 업데이트하는 메소드.
|
106
|
+
|
107
|
+
Args:
|
108
|
+
inPelvisWeight: 골반 가중치
|
109
|
+
inThighWeight: 허벅지 가중치
|
110
|
+
|
111
|
+
Returns:
|
112
|
+
None
|
113
|
+
"""
|
114
|
+
if len(self.genBones) == 0:
|
115
|
+
return False
|
116
|
+
|
117
|
+
self.delete()
|
118
|
+
self.create_bone(self.bipObj, inPelvisWeight, inThighWeight)
|
88
119
|
|
89
120
|
|
90
121
|
|
pyjallib/max/header.py
CHANGED
@@ -25,9 +25,8 @@ from .bip import Bip
|
|
25
25
|
from .skin import Skin
|
26
26
|
|
27
27
|
from .twistBone import TwistBone
|
28
|
-
from .
|
29
|
-
from .
|
30
|
-
from .volumePreserveBone import VolumePreserveBone
|
28
|
+
# from .autoClavicle import AutoClavicle
|
29
|
+
# from .volumePreserveBone import VolumePreserveBone
|
31
30
|
|
32
31
|
from .morph import Morph
|
33
32
|
|
@@ -69,9 +68,8 @@ class Header:
|
|
69
68
|
self.skin = Skin()
|
70
69
|
|
71
70
|
self.twistBone = TwistBone(nameService=self.name, animService=self.anim, constService=self.constraint, bipService=self.bip, boneService=self.bone)
|
72
|
-
self.
|
73
|
-
self.
|
74
|
-
self.volumePreserveBone = VolumePreserveBone(nameService=self.name, animService=self.anim, constService=self.constraint, boneService=self.bone, helperService=self.helper)
|
71
|
+
# self.autoClavicle = AutoClavicle(nameService=self.name, animService=self.anim, helperService=self.helper, boneService=self.bone, constraintService=self.constraint, bipService=self.bip)
|
72
|
+
# self.volumePreserveBone = VolumePreserveBone(nameService=self.name, animService=self.anim, constService=self.constraint, boneService=self.bone, helperService=self.helper)
|
75
73
|
|
76
74
|
self.morph = Morph()
|
77
75
|
|