diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterimagepreview.cpp | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index 7dce9a5..24b9929 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp | |||
@@ -73,7 +73,9 @@ const S32 PREVIEW_TEXTURE_HEIGHT = 300; | |||
73 | // LLFloaterImagePreview() | 73 | // LLFloaterImagePreview() |
74 | //----------------------------------------------------------------------------- | 74 | //----------------------------------------------------------------------------- |
75 | LLFloaterImagePreview::LLFloaterImagePreview(const std::string& filename) : | 75 | LLFloaterImagePreview::LLFloaterImagePreview(const std::string& filename) : |
76 | LLFloaterNameDesc(filename) | 76 | LLFloaterNameDesc(filename), |
77 | mAvatarPreview(NULL), | ||
78 | mSculptedPreview(NULL) | ||
77 | { | 79 | { |
78 | mLastMouseX = 0; | 80 | mLastMouseX = 0; |
79 | mLastMouseY = 0; | 81 | mLastMouseY = 0; |
@@ -211,13 +213,16 @@ void LLFloaterImagePreview::onPreviewTypeCommit(LLUICtrl* ctrl, void* userdata) | |||
211 | //----------------------------------------------------------------------------- | 213 | //----------------------------------------------------------------------------- |
212 | void LLFloaterImagePreview::clearAllPreviewTextures() | 214 | void LLFloaterImagePreview::clearAllPreviewTextures() |
213 | { | 215 | { |
214 | mAvatarPreview->clearPreviewTexture("mHairMesh0"); | 216 | if (mAvatarPreview) |
215 | mAvatarPreview->clearPreviewTexture("mUpperBodyMesh0"); | 217 | { |
216 | mAvatarPreview->clearPreviewTexture("mLowerBodyMesh0"); | 218 | mAvatarPreview->clearPreviewTexture("mHairMesh0"); |
217 | mAvatarPreview->clearPreviewTexture("mHeadMesh0"); | 219 | mAvatarPreview->clearPreviewTexture("mUpperBodyMesh0"); |
218 | mAvatarPreview->clearPreviewTexture("mUpperBodyMesh0"); | 220 | mAvatarPreview->clearPreviewTexture("mLowerBodyMesh0"); |
219 | mAvatarPreview->clearPreviewTexture("mLowerBodyMesh0"); | 221 | mAvatarPreview->clearPreviewTexture("mHeadMesh0"); |
220 | mAvatarPreview->clearPreviewTexture("mSkirtMesh0"); | 222 | mAvatarPreview->clearPreviewTexture("mUpperBodyMesh0"); |
223 | mAvatarPreview->clearPreviewTexture("mLowerBodyMesh0"); | ||
224 | mAvatarPreview->clearPreviewTexture("mSkirtMesh0"); | ||
225 | } | ||
221 | } | 226 | } |
222 | 227 | ||
223 | //----------------------------------------------------------------------------- | 228 | //----------------------------------------------------------------------------- |
@@ -668,11 +673,14 @@ void LLImagePreviewAvatar::setPreviewTarget(const std::string& joint_name, const | |||
668 | //----------------------------------------------------------------------------- | 673 | //----------------------------------------------------------------------------- |
669 | void LLImagePreviewAvatar::clearPreviewTexture(const std::string& mesh_name) | 674 | void LLImagePreviewAvatar::clearPreviewTexture(const std::string& mesh_name) |
670 | { | 675 | { |
671 | LLViewerJointMesh *mesh = (LLViewerJointMesh*)mDummyAvatar->mRoot.findJoint(mesh_name); | 676 | if (mDummyAvatar) |
672 | // clear out existing test mesh | ||
673 | if (mesh) | ||
674 | { | 677 | { |
675 | mesh->setTestTexture(0); | 678 | LLViewerJointMesh *mesh = (LLViewerJointMesh*)mDummyAvatar->mRoot.findJoint(mesh_name); |
679 | // clear out existing test mesh | ||
680 | if (mesh) | ||
681 | { | ||
682 | mesh->setTestTexture(0); | ||
683 | } | ||
676 | } | 684 | } |
677 | } | 685 | } |
678 | 686 | ||
@@ -793,27 +801,11 @@ LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLDynami | |||
793 | 801 | ||
794 | F32 const HIGHEST_LOD = 4.0f; | 802 | F32 const HIGHEST_LOD = 4.0f; |
795 | mVolume = new LLVolume(volume_params, HIGHEST_LOD); | 803 | mVolume = new LLVolume(volume_params, HIGHEST_LOD); |
796 | |||
797 | /* | ||
798 | mDummyAvatar = new LLVOAvatar(LLUUID::null, LL_PCODE_LEGACY_AVATAR, gAgent.getRegion()); | ||
799 | mDummyAvatar->createDrawable(&gPipeline); | ||
800 | mDummyAvatar->mIsDummy = TRUE; | ||
801 | mDummyAvatar->mSpecialRenderMode = 2; | ||
802 | mDummyAvatar->setPositionAgent(LLVector3::zero); | ||
803 | mDummyAvatar->slamPosition(); | ||
804 | mDummyAvatar->updateJointLODs(); | ||
805 | mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); | ||
806 | gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance()); | ||
807 | mTextureName = 0; | ||
808 | */ | ||
809 | } | 804 | } |
810 | 805 | ||
811 | 806 | ||
812 | LLImagePreviewSculpted::~LLImagePreviewSculpted() | 807 | LLImagePreviewSculpted::~LLImagePreviewSculpted() |
813 | { | 808 | { |
814 | /* | ||
815 | mDummyAvatar->markDead(); | ||
816 | */ | ||
817 | } | 809 | } |
818 | 810 | ||
819 | 811 | ||