summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2011-03-14 16:17:34 -0400
committerprep <prep@lindenlab.com>2011-03-14 16:17:34 -0400
commitbc54afb907e65ab2d73e1f040551c6191a4a7682 (patch)
treef9496183f41e2d010c3c34531bdbd68d9fd1ccf7 /indra/newview
parent8903578344987432cebc46d889b94574bc005007 (diff)
WIP: manual pelvis offset for rigs that contain bone offsets
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp18
-rw-r--r--indra/newview/llfloatermodelpreview.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_preview.xml7
3 files changed, 25 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index f65fab41e7..d4ba039eeb 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -310,6 +310,7 @@ BOOL LLFloaterModelPreview::postBuild()
childSetCommitCallback("upload_joints", onUploadJointsCommit, this);
childSetCommitCallback("import_scale", onImportScaleCommit, this);
+ childSetCommitCallback("pelvis_offset", onPelvisOffsetCommit, this);
childSetCommitCallback("lod_file_or_limit", refresh, this);
childSetCommitCallback("physics_load_radio", refresh, this);
@@ -318,6 +319,9 @@ BOOL LLFloaterModelPreview::postBuild()
childDisable("upload_skin");
childDisable("upload_joints");
+
+ childDisable("pelvis_offset");
+
childDisable("ok_btn");
mViewOptionMenuButton = getChild<LLMenuButton>("options_gear_btn");
@@ -456,6 +460,18 @@ void LLFloaterModelPreview::onImportScaleCommit(LLUICtrl*,void* userdata)
fp->mModelPreview->calcResourceCost();
fp->mModelPreview->refresh();
}
+//static
+void LLFloaterModelPreview::onPelvisOffsetCommit( LLUICtrl*, void* userdata )
+{
+ LLFloaterModelPreview *fp =(LLFloaterModelPreview*)userdata;
+
+ if (!fp->mModelPreview)
+ {
+ return;
+ }
+
+ fp->mModelPreview->refresh();
+}
//static
void LLFloaterModelPreview::onUploadJointsCommit(LLUICtrl*,void* userdata)
@@ -3742,7 +3758,7 @@ BOOL LLModelPreview::render()
if (fmp)
{
fmp->enableViewOption("show_skin_weight");
- fmp->setViewOptionEnabled("show_joint_positions", skin_weight);
+ fmp->setViewOptionEnabled("show_joint_positions", skin_weight);
}
mFMP->childEnable("upload_skin");
}
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index ffda565fef..aac20244cc 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -183,6 +183,7 @@ protected:
friend class LLPhysicsDecomp;
static void onImportScaleCommit(LLUICtrl*, void*);
+ static void onPelvisOffsetCommit(LLUICtrl*, void*);
static void onUploadJointsCommit(LLUICtrl*,void*);
static void onUploadSkinCommit(LLUICtrl*,void*);
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index ca4e4a3a2a..e79dfcbc7d 100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -388,6 +388,13 @@
<check_box top_pad="5" name="upload_textures" height="15" follows="top|left" label="Textures"/>
<check_box top_pad="5" name="upload_skin" height="15" follows="top|left" label="Skin weight"/>
<check_box top_pad="5" left="20" name="upload_joints" height="15" follows="top|left" label="Joint positions"/>
+
+ <text left="10" top_pad="4" width="90" bottom="30" follows="top|left" height="15">
+ Pelvis Offset:
+ </text>
+
+ <spinner left="10" top_pad="4" height="20" follows="top|left" width="80" value="0.0" min_val="0.00" max_val="32.0" name="pelvis_offset"/>
+
</panel>
</tab_container>