Skip to content

Commit

Permalink
MotionSupporter_1.03_β08
Browse files Browse the repository at this point in the history
MotionSupporter_1.03_β08 miumiu
・スムージング
 ・間引き処理を見直し
 ・dhermes/bezier#242
・エラーログメッセージを修正
・多段分割・多段統合の画面インデックス名を123からXYZに戻した
  • Loading branch information
miu200521358 committed Aug 15, 2021
1 parent 47ee970 commit 32d1df2
Show file tree
Hide file tree
Showing 22 changed files with 320 additions and 208 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
*.bat text eol=crlf
*.csv text eol=crlf
*.txt text eol=crlf
*.spec text encoding=shift-jis eol=crlf
*.spec text eol=crlf
2 changes: 1 addition & 1 deletion motion_supporter64.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exe = EXE(pyz,
a.zipfiles,
a.datas,
[],
name='MotionSupporter_1.03_β05_64bit',
name='MotionSupporter_1.03_β08_64bit',
debug=False,
bootloader_ignore_signals=False,
strip=False,
Expand Down
12 changes: 12 additions & 0 deletions run_debug.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@echo off
rem ---
rem --- vmdデータのトレースモデルを変換
rem ---

rem --- カレントディレクトリを実行先に変更
cd /d %~dp0

cls

src\setup.bat && activate vmdsizing_cython && python src\executor.py --out_log 1 --verbose 10 --is_saving 1

12 changes: 12 additions & 0 deletions run_debug_info.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@echo off
rem ---
rem --- vmdデータのトレースモデルを変換
rem ---

rem --- カレントディレクトリを実行先に変更
cd /d %~dp0

cls

src\setup.bat && activate vmdsizing_cython && python src\executor.py --out_log 1 --verbose 16 --is_saving 1

File renamed without changes.
12 changes: 12 additions & 0 deletions run_gui_high.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@echo off
rem ---
rem --- vmdデータのトレースモデルを変換
rem ---

rem --- カレントディレクトリを実行先に変更
cd /d %~dp0

cls

activate vmdsizing_cython && src\setup.bat && python src\executor.py --out_log 1 --verbose 20 --is_saving 0

2 changes: 1 addition & 1 deletion src/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from utils import MFileUtils
from utils.MException import SizingException

VERSION_NAME = "1.03_β05"
VERSION_NAME = "1.03_β08"

# 指数表記なし、有効小数点桁数6、30を超えると省略あり、一行の文字数200
np.set_printoptions(suppress=True, precision=6, threshold=30, linewidth=200)
Expand Down
4 changes: 2 additions & 2 deletions src/form/panel/LegFKtoIKPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def __init__(self, frame: wx.Frame, leg_fk2ik: wx.Notebook, tab_idx: int):

self.setting_flg_sizer = wx.BoxSizer(wx.HORIZONTAL)

self.ankle_horizonal_flg_ctrl = wx.CheckBox(self, wx.ID_ANY, u"初期足首水平化", wx.DefaultPosition, wx.DefaultSize, 0)
self.ankle_horizonal_flg_ctrl.SetToolTip(u"チェックを入れると、初期値が指定されている足首キーフレを地面と水平になるように角度を調整します。")
self.ankle_horizonal_flg_ctrl = wx.CheckBox(self, wx.ID_ANY, u"足首水平化", wx.DefaultPosition, wx.DefaultSize, 0)
self.ankle_horizonal_flg_ctrl.SetToolTip(u"チェックを入れると、水平に近い足首キーフレを地面と水平になるように角度を調整します。")
self.setting_flg_sizer.Add(self.ankle_horizonal_flg_ctrl, 0, wx.ALL, 5)

self.ground_leg_flg_ctrl = wx.CheckBox(self, wx.ID_ANY, u"かかと・つま先Y=0", wx.DefaultPosition, wx.DefaultSize, 0)
Expand Down
4 changes: 2 additions & 2 deletions src/form/parts/BaseFilePickerCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,9 @@ def load(self, file_idx=0, is_check=True):
except MKilledException:
logger.warning("読み込み処理を中断します。", decoration=MLogger.DECORATION_BOX)
except SizingException as se:
logger.error("サイジング処理が処理できないデータで終了しました\n\n%s", se.message, decoration=MLogger.DECORATION_BOX)
logger.error("読み込みが処理できないデータで終了しました\n\n%s", se.message, decoration=MLogger.DECORATION_BOX)
except Exception as e:
logger.critical("サイジング処理が意図せぬエラーで終了しました。", e, decoration=MLogger.DECORATION_BOX)
logger.critical("読み込み処理が意図せぬエラーで終了しました。", e, decoration=MLogger.DECORATION_BOX)
finally:
logging.shutdown()

Expand Down
44 changes: 42 additions & 2 deletions src/mmd/PmxReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,46 @@ def read_data(self):
pmx.bones[left_ik_sole_bone.name] = left_ik_sole_bone
pmx.bone_indexes[left_ik_sole_bone.index] = left_ik_sole_bone.name

if "右足首" in pmx.bones:
right_heel_bone = Bone("右かかと", "", MVector3D(pmx.bones["右足首"].position.x(), 0, pmx.bones["右足首"].position.z()), -1, 0, 0)
right_heel_bone.parent_index = pmx.bones["右つま先"].index
right_heel_bone.index = len(pmx.bones.keys())
pmx.bones[right_heel_bone.name] = right_heel_bone
pmx.bone_indexes[right_heel_bone.index] = right_heel_bone.name

if "左足首" in pmx.bones:
left_heel_bone = Bone("左かかと", "", MVector3D(pmx.bones["左足首"].position.x(), 0, pmx.bones["左足首"].position.z()), -1, 0, 0)
left_heel_bone.parent_index = pmx.bones["左つま先"].index
left_heel_bone.index = len(pmx.bones.keys())
pmx.bones[left_heel_bone.name] = left_heel_bone
pmx.bone_indexes[left_heel_bone.index] = left_heel_bone.name

if "右つま先" in pmx.bones:
right_big_toe_bone = Bone("右足親指", "", pmx.bones["右つま先"].position + MVector3D(0.5, 0, 0), -1, 0, 0)
right_big_toe_bone.parent_index = pmx.bones["右つま先"].index
right_big_toe_bone.index = len(pmx.bones.keys())
pmx.bones[right_big_toe_bone.name] = right_big_toe_bone
pmx.bone_indexes[right_big_toe_bone.index] = right_big_toe_bone.name

right_small_toe_bone = Bone("右足小指", "", pmx.bones["右つま先"].position + MVector3D(-0.5, 0, 0), -1, 0, 0)
right_small_toe_bone.parent_index = pmx.bones["右つま先"].index
right_small_toe_bone.index = len(pmx.bones.keys())
pmx.bones[right_small_toe_bone.name] = right_small_toe_bone
pmx.bone_indexes[right_small_toe_bone.index] = right_small_toe_bone.name

if "左つま先" in pmx.bones:
left_big_toe_bone = Bone("左足親指", "", pmx.bones["左つま先"].position + MVector3D(-0.5, 0, 0), -1, 0, 0)
left_big_toe_bone.parent_index = pmx.bones["左つま先"].index
left_big_toe_bone.index = len(pmx.bones.keys())
pmx.bones[left_big_toe_bone.name] = left_big_toe_bone
pmx.bone_indexes[left_big_toe_bone.index] = left_big_toe_bone.name

left_small_toe_bone = Bone("左足小指", "", pmx.bones["左つま先"].position + MVector3D(0.5, 0, 0), -1, 0, 0)
left_small_toe_bone.parent_index = pmx.bones["左つま先"].index
left_small_toe_bone.index = len(pmx.bones.keys())
pmx.bones[left_small_toe_bone.name] = left_small_toe_bone
pmx.bone_indexes[left_small_toe_bone.index] = left_small_toe_bone.name

# 首根元ボーン
if "左肩" in pmx.bones and "右肩" in pmx.bones:
neck_base_vertex = Vertex(-1, (pmx.bones["左肩"].position + pmx.bones["右肩"].position) / 2, MVector3D(), [], [], Bdef1(-1), -1)
Expand Down Expand Up @@ -767,11 +807,11 @@ def read_data(self):
# 終了命令
raise ke
except SizingException as se:
logger.error("サイジング処理が処理できないデータで終了しました\n\n%s", se.message)
logger.error("PMX読み込み処理が処理できないデータで終了しました\n\n%s", se.message, decoration=MLogger.DECORATION_BOX)
return se
except Exception as e:
import traceback
logger.error("サイジング処理が意図せぬエラーで終了しました\n\n%s", traceback.format_exc())
logger.critical("PMX読み込み処理が意図せぬエラーで終了しました\n\n%s", traceback.format_exc(), decoration=MLogger.DECORATION_BOX)
raise e

def hexdigest(self):
Expand Down
Loading

0 comments on commit 32d1df2

Please sign in to comment.