diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloateranimpreview.cpp | 64 |
1 files changed, 47 insertions, 17 deletions
diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp index 317636e..253e5b0 100644 --- a/linden/indra/newview/llfloateranimpreview.cpp +++ b/linden/indra/newview/llfloateranimpreview.cpp | |||
@@ -114,6 +114,34 @@ LLFloaterAnimPreview::LLFloaterAnimPreview(const char* filename) : | |||
114 | } | 114 | } |
115 | 115 | ||
116 | //----------------------------------------------------------------------------- | 116 | //----------------------------------------------------------------------------- |
117 | // setAnimCallbacks() | ||
118 | //----------------------------------------------------------------------------- | ||
119 | void LLFloaterAnimPreview::setAnimCallbacks() | ||
120 | { | ||
121 | childSetCommitCallback("playback_slider", onSliderMove, this); | ||
122 | |||
123 | childSetCommitCallback("preview_base_anim", onCommitBaseAnim, this); | ||
124 | childSetValue("preview_base_anim", "Standing"); | ||
125 | |||
126 | childSetCommitCallback("priority", onCommitPriority, this); | ||
127 | childSetCommitCallback("loop_check", onCommitLoop, this); | ||
128 | childSetCommitCallback("loop_in_point", onCommitLoopIn, this); | ||
129 | childSetValidate("loop_in_point", validateLoopIn); | ||
130 | childSetCommitCallback("loop_out_point", onCommitLoopOut, this); | ||
131 | childSetValidate("loop_out_point", validateLoopOut); | ||
132 | |||
133 | childSetCommitCallback("hand_pose_combo", onCommitHandPose, this); | ||
134 | |||
135 | childSetCommitCallback("emote_combo", onCommitEmote, this); | ||
136 | childSetValue("emote_combo", "[None]"); | ||
137 | |||
138 | childSetCommitCallback("ease_in_time", onCommitEaseIn, this); | ||
139 | childSetValidate("ease_in_time", validateEaseIn); | ||
140 | childSetCommitCallback("ease_out_time", onCommitEaseOut, this); | ||
141 | childSetValidate("ease_out_time", validateEaseOut); | ||
142 | } | ||
143 | |||
144 | //----------------------------------------------------------------------------- | ||
117 | // postBuild() | 145 | // postBuild() |
118 | //----------------------------------------------------------------------------- | 146 | //----------------------------------------------------------------------------- |
119 | BOOL LLFloaterAnimPreview::postBuild() | 147 | BOOL LLFloaterAnimPreview::postBuild() |
@@ -172,29 +200,29 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
172 | mStopButton->setScaleImage(TRUE); | 200 | mStopButton->setScaleImage(TRUE); |
173 | 201 | ||
174 | r.set(r.mRight + PREVIEW_HPAD, y, getRect().getWidth() - PREVIEW_HPAD, y - BTN_HEIGHT); | 202 | r.set(r.mRight + PREVIEW_HPAD, y, getRect().getWidth() - PREVIEW_HPAD, y - BTN_HEIGHT); |
175 | childSetCommitCallback("playback_slider", onSliderMove, this); | 203 | //childSetCommitCallback("playback_slider", onSliderMove, this); |
176 | 204 | ||
177 | childHide("bad_animation_text"); | 205 | childHide("bad_animation_text"); |
178 | 206 | ||
179 | childSetCommitCallback("preview_base_anim", onCommitBaseAnim, this); | 207 | //childSetCommitCallback("preview_base_anim", onCommitBaseAnim, this); |
180 | childSetValue("preview_base_anim", "Standing"); | 208 | //childSetValue("preview_base_anim", "Standing"); |
181 | 209 | ||
182 | childSetCommitCallback("priority", onCommitPriority, this); | 210 | //childSetCommitCallback("priority", onCommitPriority, this); |
183 | childSetCommitCallback("loop_check", onCommitLoop, this); | 211 | //childSetCommitCallback("loop_check", onCommitLoop, this); |
184 | childSetCommitCallback("loop_in_point", onCommitLoopIn, this); | 212 | //childSetCommitCallback("loop_in_point", onCommitLoopIn, this); |
185 | childSetValidate("loop_in_point", validateLoopIn); | 213 | //childSetValidate("loop_in_point", validateLoopIn); |
186 | childSetCommitCallback("loop_out_point", onCommitLoopOut, this); | 214 | //childSetCommitCallback("loop_out_point", onCommitLoopOut, this); |
187 | childSetValidate("loop_out_point", validateLoopOut); | 215 | //childSetValidate("loop_out_point", validateLoopOut); |
188 | 216 | ||
189 | childSetCommitCallback("hand_pose_combo", onCommitHandPose, this); | 217 | //childSetCommitCallback("hand_pose_combo", onCommitHandPose, this); |
190 | 218 | ||
191 | childSetCommitCallback("emote_combo", onCommitEmote, this); | 219 | //childSetCommitCallback("emote_combo", onCommitEmote, this); |
192 | childSetValue("emote_combo", "[None]"); | 220 | //childSetValue("emote_combo", "[None]"); |
193 | 221 | ||
194 | childSetCommitCallback("ease_in_time", onCommitEaseIn, this); | 222 | //childSetCommitCallback("ease_in_time", onCommitEaseIn, this); |
195 | childSetValidate("ease_in_time", validateEaseIn); | 223 | //childSetValidate("ease_in_time", validateEaseIn); |
196 | childSetCommitCallback("ease_out_time", onCommitEaseOut, this); | 224 | //childSetCommitCallback("ease_out_time", onCommitEaseOut, this); |
197 | childSetValidate("ease_out_time", validateEaseOut); | 225 | //childSetValidate("ease_out_time", validateEaseOut); |
198 | 226 | ||
199 | if (!stricmp(strrchr(mFilename.c_str(), '.'), ".bvh")) | 227 | if (!stricmp(strrchr(mFilename.c_str(), '.'), ".bvh")) |
200 | { | 228 | { |
@@ -254,6 +282,8 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
254 | 282 | ||
255 | if (success) | 283 | if (success) |
256 | { | 284 | { |
285 | setAnimCallbacks() ; | ||
286 | |||
257 | const LLBBoxLocal &pelvis_bbox = motionp->getPelvisBBox(); | 287 | const LLBBoxLocal &pelvis_bbox = motionp->getPelvisBBox(); |
258 | 288 | ||
259 | LLVector3 temp = pelvis_bbox.getCenter(); | 289 | LLVector3 temp = pelvis_bbox.getCenter(); |
@@ -314,7 +344,7 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
314 | } | 344 | } |
315 | } | 345 | } |
316 | 346 | ||
317 | setEnabled(FALSE); | 347 | //setEnabled(FALSE); |
318 | mMotionID.setNull(); | 348 | mMotionID.setNull(); |
319 | mAnimPreview = NULL; | 349 | mAnimPreview = NULL; |
320 | } | 350 | } |