|
11 | 11 | from PySide6.QtCore import qInstallMessageHandler, QtMsgType |
12 | 12 | import os |
13 | 13 |
|
14 | | -from unity_animation_player import PysideAnimationPlayer |
| 14 | +from unity_animation_player import SignalAnimationPlayer |
15 | 15 | from .popup_window import PopupWindow |
16 | 16 | from .graph_window import AnimGraphWidget |
17 | 17 |
|
@@ -60,13 +60,13 @@ def qml_message_handler(mode, context, message): |
60 | 60 | class ButtonAnimationData(QObject): |
61 | 61 | """避免Signal只能作为类属性创建而无法动态创建的问题""" |
62 | 62 | button_name: str |
63 | | - player: PysideAnimationPlayer |
| 63 | + player: SignalAnimationPlayer |
64 | 64 | signal: Signal = Signal(dict) |
65 | 65 |
|
66 | 66 | def __init__(self, button_name: str): |
67 | 67 | super().__init__() |
68 | 68 | self.button_name = button_name |
69 | | - self.player = PysideAnimationPlayer(self.signal, f"examples/AnimationClip/UIAni_Button_Scale.anim") |
| 69 | + self.player = SignalAnimationPlayer(self.signal, f"examples/AnimationClip/UIAni_Button_Scale.anim") |
70 | 70 |
|
71 | 71 |
|
72 | 72 | class ExampleWindow(PopupWindow): |
@@ -103,8 +103,8 @@ def __init__(self) -> None: |
103 | 103 | self.setup_multiple_animations(self.animated_buttons) |
104 | 104 |
|
105 | 105 | self.ball_animation_signal.connect(self.on_ball_signal_received) |
106 | | - #self.ball_animation_player = PysideAnimationPlayer(self.ball_animation_signal, "examples/AnimationClip/Hihumi_Original_TSS_Interaction01.anim", stop_time=None, position_ratio=(-24000, -6000), path="bone_root/Bip001") |
107 | | - self.ball_animation_player = PysideAnimationPlayer(self.ball_animation_signal, "examples/AnimationClip/T.anim", stop_time=None, position_ratio=(9, 4)) |
| 106 | + #self.ball_animation_player = SignalAnimationPlayer(self.ball_animation_signal, "examples/AnimationClip/Hihumi_Original_TSS_Interaction01.anim", stop_time=None, position_ratio=(-24000, -6000), path="bone_root/Bip001") |
| 107 | + self.ball_animation_player = SignalAnimationPlayer(self.ball_animation_signal, "examples/AnimationClip/T.anim", stop_time=None, position_ratio=(9, 4)) |
108 | 108 |
|
109 | 109 | self.ball_animation_player.register_event('eventTriggered', self.event_triggered, ('data',)) |
110 | 110 |
|
|
0 commit comments