diff options
author | Armin Weatherwax | 2009-06-19 14:09:27 +0200 |
---|---|---|
committer | McCabe Maxsted | 2010-09-01 09:40:28 -0700 |
commit | 7a9c76f27af6116a5aab6029224c400c36a8cf17 (patch) | |
tree | 7c98f8006121dc75343a28789aad166d33306577 /linden/indra/newview | |
parent | increased preference panel size (diff) | |
download | meta-impy-7a9c76f27af6116a5aab6029224c400c36a8cf17.zip meta-impy-7a9c76f27af6116a5aab6029224c400c36a8cf17.tar.gz meta-impy-7a9c76f27af6116a5aab6029224c400c36a8cf17.tar.bz2 meta-impy-7a9c76f27af6116a5aab6029224c400c36a8cf17.tar.xz |
quick hack: preview animation locally on own avatar when uploading.
modified: linden/indra/newview/app_settings/settings.xml
modified: linden/indra/newview/llfloateranimpreview.cpp
modified: linden/indra/newview/llfloateranimpreview.h
modified: linden/indra/newview/skins/default/xui/en-us/floater_animation_preview.xml
Diffstat (limited to 'linden/indra/newview')
4 files changed, 28 insertions, 17 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 9f6362f..b1917ec 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -8243,10 +8243,10 @@ | |||
8243 | <string>Rect</string> | 8243 | <string>Rect</string> |
8244 | <key>Value</key> | 8244 | <key>Value</key> |
8245 | <array> | 8245 | <array> |
8246 | <integer>0</integer> | 8246 | <integer>11</integer> |
8247 | <integer>85</integer> | 8247 | <integer>459</integer> |
8248 | <integer>300</integer> | 8248 | <integer>311</integer> |
8249 | <integer>0</integer> | 8249 | <integer>173</integer> |
8250 | </array> | 8250 | </array> |
8251 | </map> | 8251 | </map> |
8252 | <key>PreviewClassifiedRect</key> | 8252 | <key>PreviewClassifiedRect</key> |
@@ -8307,9 +8307,9 @@ | |||
8307 | <string>Rect</string> | 8307 | <string>Rect</string> |
8308 | <key>Value</key> | 8308 | <key>Value</key> |
8309 | <array> | 8309 | <array> |
8310 | <integer>0</integer> | 8310 | <integer>0</integer> |
8311 | <integer>85</integer> | 8311 | <integer>530</integer> |
8312 | <integer>300</integer> | 8312 | <integer>420</integer> |
8313 | <integer>0</integer> | 8313 | <integer>0</integer> |
8314 | </array> | 8314 | </array> |
8315 | </map> | 8315 | </map> |
diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp index a7d880e..ce7737d 100644 --- a/linden/indra/newview/llfloateranimpreview.cpp +++ b/linden/indra/newview/llfloateranimpreview.cpp | |||
@@ -326,6 +326,7 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
326 | seconds_string = llformat(" - %.2f seconds", motionp->getDuration()); | 326 | seconds_string = llformat(" - %.2f seconds", motionp->getDuration()); |
327 | 327 | ||
328 | setTitle(mFilename + std::string(seconds_string)); | 328 | setTitle(mFilename + std::string(seconds_string)); |
329 | |||
329 | } | 330 | } |
330 | else | 331 | else |
331 | { | 332 | { |
@@ -371,6 +372,13 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
371 | //----------------------------------------------------------------------------- | 372 | //----------------------------------------------------------------------------- |
372 | LLFloaterAnimPreview::~LLFloaterAnimPreview() | 373 | LLFloaterAnimPreview::~LLFloaterAnimPreview() |
373 | { | 374 | { |
375 | if (mMotionID.notNull() && mAnimPreview) | ||
376 | { | ||
377 | mAnimPreview->getDummyAvatar()->deactivateAllMotions(); | ||
378 | mAnimPreview->getDummyAvatar()->removeMotion(mMotionID); | ||
379 | LLKeyframeDataCache::removeKeyframeData(mMotionID); | ||
380 | } | ||
381 | |||
374 | delete mAnimPreview; | 382 | delete mAnimPreview; |
375 | mAnimPreview = NULL; | 383 | mAnimPreview = NULL; |
376 | 384 | ||
@@ -389,7 +397,7 @@ void LLFloaterAnimPreview::draw() | |||
389 | 397 | ||
390 | if (mMotionID.notNull() && mAnimPreview) | 398 | if (mMotionID.notNull() && mAnimPreview) |
391 | { | 399 | { |
392 | gGL.color3f(1.f, 1.f, 1.f); | 400 | /* gGL.color3f(1.f, 1.f, 1.f); |
393 | 401 | ||
394 | gGL.getTexUnit(0)->bind(mAnimPreview->getTexture()); | 402 | gGL.getTexUnit(0)->bind(mAnimPreview->getTexture()); |
395 | 403 | ||
@@ -407,7 +415,7 @@ void LLFloaterAnimPreview::draw() | |||
407 | gGL.end(); | 415 | gGL.end(); |
408 | 416 | ||
409 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); | 417 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
410 | 418 | */ | |
411 | LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); | 419 | LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); |
412 | if (!avatarp->areAnimationsPaused()) | 420 | if (!avatarp->areAnimationsPaused()) |
413 | { | 421 | { |
@@ -451,7 +459,7 @@ void LLFloaterAnimPreview::resetMotion() | |||
451 | mPauseRequest = NULL; | 459 | mPauseRequest = NULL; |
452 | } | 460 | } |
453 | } | 461 | } |
454 | 462 | /* | |
455 | //----------------------------------------------------------------------------- | 463 | //----------------------------------------------------------------------------- |
456 | // handleMouseDown() | 464 | // handleMouseDown() |
457 | //----------------------------------------------------------------------------- | 465 | //----------------------------------------------------------------------------- |
@@ -553,7 +561,7 @@ void LLFloaterAnimPreview::onMouseCaptureLost() | |||
553 | { | 561 | { |
554 | gViewerWindow->showCursor(); | 562 | gViewerWindow->showCursor(); |
555 | } | 563 | } |
556 | 564 | */ | |
557 | //----------------------------------------------------------------------------- | 565 | //----------------------------------------------------------------------------- |
558 | // onBtnPlay() | 566 | // onBtnPlay() |
559 | //----------------------------------------------------------------------------- | 567 | //----------------------------------------------------------------------------- |
diff --git a/linden/indra/newview/llfloateranimpreview.h b/linden/indra/newview/llfloateranimpreview.h index 639c927..eaab186 100644 --- a/linden/indra/newview/llfloateranimpreview.h +++ b/linden/indra/newview/llfloateranimpreview.h | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #ifndef LL_LLFLOATERANIMPREVIEW_H | 33 | #ifndef LL_LLFLOATERANIMPREVIEW_H |
34 | #define LL_LLFLOATERANIMPREVIEW_H | 34 | #define LL_LLFLOATERANIMPREVIEW_H |
35 | 35 | #include "llagent.h" | |
36 | #include "llfloaternamedesc.h" | 36 | #include "llfloaternamedesc.h" |
37 | #include "lldynamictexture.h" | 37 | #include "lldynamictexture.h" |
38 | #include "llcharacter.h" | 38 | #include "llcharacter.h" |
@@ -55,7 +55,10 @@ public: | |||
55 | void pan(F32 right, F32 up); | 55 | void pan(F32 right, F32 up); |
56 | virtual BOOL needsUpdate() { return mNeedsUpdate; } | 56 | virtual BOOL needsUpdate() { return mNeedsUpdate; } |
57 | 57 | ||
58 | LLVOAvatar* getDummyAvatar() { return mDummyAvatar; } | 58 | // LLVOAvatar* getDummyAvatar() { return mDummyAvatar; } |
59 | // HACK:don't get a dummy... | ||
60 | LLVOAvatar* getDummyAvatar() { return gAgent.getAvatarObject();} | ||
61 | |||
59 | 62 | ||
60 | protected: | 63 | protected: |
61 | BOOL mNeedsUpdate; | 64 | BOOL mNeedsUpdate; |
@@ -75,13 +78,13 @@ public: | |||
75 | virtual ~LLFloaterAnimPreview(); | 78 | virtual ~LLFloaterAnimPreview(); |
76 | 79 | ||
77 | BOOL postBuild(); | 80 | BOOL postBuild(); |
78 | 81 | /* | |
79 | BOOL handleMouseDown(S32 x, S32 y, MASK mask); | 82 | BOOL handleMouseDown(S32 x, S32 y, MASK mask); |
80 | BOOL handleMouseUp(S32 x, S32 y, MASK mask); | 83 | BOOL handleMouseUp(S32 x, S32 y, MASK mask); |
81 | BOOL handleHover(S32 x, S32 y, MASK mask); | 84 | BOOL handleHover(S32 x, S32 y, MASK mask); |
82 | BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); | 85 | BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); |
83 | void onMouseCaptureLost(); | 86 | void onMouseCaptureLost(); |
84 | 87 | */ | |
85 | void refresh(); | 88 | void refresh(); |
86 | 89 | ||
87 | static void onBtnPlay(void*); | 90 | static void onBtnPlay(void*); |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_animation_preview.xml b/linden/indra/newview/skins/default/xui/en-us/floater_animation_preview.xml index 1a7bdb0..e710d41 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_animation_preview.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_animation_preview.xml | |||
@@ -1,7 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="false" | 2 | <floater can_close="true" can_drag_on_left="false" can_minimize="false" |
3 | can_resize="false" height="556" min_height="556" min_width="300" | 3 | can_resize="false" height="286" min_height="286" min_width="300" |
4 | name="Animation Preview" title="" width="300"> | 4 | name="Animation Preview" rect_control="PreviewAnimRect" title="" width="300"> |
5 | <pad height="12" /> | 5 | <pad height="12" /> |
6 | <text follows="top|left" height="15" left="10" name="name_label"> | 6 | <text follows="top|left" height="15" left="10" name="name_label"> |
7 | Name: | 7 | Name: |