Commit 753bf8b3 authored by NiranV's avatar NiranV
Browse files

Changed: Disable all Poser controls until we started posing to 'guide' the...

Changed: Disable all Poser controls until we started posing to 'guide' the user better. Still needs some more work.

--HG--
branch : Black Dragon
parent 4ab890ac
......@@ -860,12 +860,13 @@ void BDFloaterPoser::onJointControlsRefresh()
}
getChild<LLButton>("toggle_bone")->setEnabled(item && is_posing && index == JOINTS);
getChild<LLButton>("reset_bone_rot")->setEnabled(item && is_posing && index == JOINTS);
getChild<LLButton>("reset_bone_pos")->setEnabled(item && is_posing);
getChild<LLButton>("reset_bone_scale")->setEnabled(item && is_posing);
//getChild<LLButton>("reset_bone_rot")->setEnabled(item && is_posing && index == JOINTS);
//getChild<LLButton>("reset_bone_pos")->setEnabled(item && is_posing);
//getChild<LLButton>("reset_bone_scale")->setEnabled(item && is_posing);
getChild<LLButton>("activate")->setValue(is_posing);
getChild<LLUICtrl>("pose_name")->setEnabled(is_posing);
getChild<LLUICtrl>("save_poses")->setEnabled(is_posing);
getChild<LLUICtrl>("joints_tabs")->setEnabled(is_posing);
//BD - Depending on which interpolation type the user selects we want the time editor to show
// a different label, since spherical and linear both have different min/max numbers and
......@@ -878,17 +879,27 @@ void BDFloaterPoser::onJointControlsRefresh()
const std::string label_time = interp_type == 1 ? "linear_time" : "spherical_time";
getChild<LLLineEditor>("interpolation_time")->setLabel(getString(label_time));
mRotationSliders[VX]->setEnabled(item && is_posing && index == JOINTS);
mRotationSliders[VY]->setEnabled(item && is_posing && index == JOINTS);
mRotationSliders[VZ]->setEnabled(item && is_posing && index == JOINTS);
mPositionSliders[VX]->setEnabled(is_posing && can_position);
mPositionSliders[VY]->setEnabled(is_posing && can_position);
mPositionSliders[VZ]->setEnabled(is_posing && can_position);
mScaleSliders[VX]->setEnabled(item && is_posing);
mScaleSliders[VY]->setEnabled(item && is_posing);
mScaleSliders[VZ]->setEnabled(item && is_posing);
//BD - Enable position tabs whenever positions are available, scales are always enabled
// unless we are editing attachment bones, rotations on the other hand are only
// enabled when editing joints.
LLTabContainer* modifier_tabs = getChild<LLTabContainer>("modifier_tabs");
modifier_tabs->enableTabButton(0, (item && is_posing && index == JOINTS));
//getChild<LLUICtrl>("rotation_panel")->setEnabled(item && is_posing && index == JOINTS);
//mRotationSliders[VX]->setEnabled(item && is_posing && index == JOINTS);
//mRotationSliders[VY]->setEnabled(item && is_posing && index == JOINTS);
//mRotationSliders[VZ]->setEnabled(item && is_posing && index == JOINTS);
modifier_tabs->enableTabButton(0, (item && is_posing && can_position));
//getChild<LLUICtrl>("position_panel")->setEnabled(item && is_posing && can_position);
//mPositionSliders[VX]->setEnabled(is_posing && can_position);
//mPositionSliders[VY]->setEnabled(is_posing && can_position);
//mPositionSliders[VZ]->setEnabled(is_posing && can_position);
modifier_tabs->enableTabButton(0, (item && is_posing && index != ATTACHMENT_BONES));
//getChild<LLUICtrl>("scale_panel")->setEnabled(item && is_posing && index != ATTACHMENT_BONES);
//mScaleSliders[VX]->setEnabled(item && is_posing);
//mScaleSliders[VY]->setEnabled(item && is_posing);
//mScaleSliders[VZ]->setEnabled(item && is_posing);
F32 max_val = is_pelvis ? 20.f : 1.0f;
mPositionSliders[VX]->setMaxValue(max_val);
......
......@@ -184,6 +184,7 @@ width="678">
height="299"
layout="topleft"
left="0"
enabled="false"
name="joints_tabs"
tab_height="20"
tab_group="1"
......@@ -521,7 +522,7 @@ width="678">
height="95"
layout="topleft"
left_delta="-1"
name="Modifier Tabs"
name="modifier_tabs"
tab_height="20"
tab_group="1"
tab_position="top"
......@@ -533,6 +534,7 @@ width="678">
height="95"
layout="topleft"
left="0"
enabled="false"
title="Rotation"
name="rotation_panel"
top="0"
......@@ -542,7 +544,6 @@ width="678">
can_edit_text="true"
follows="left|top"
height="14"
enabled="false"
increment="0.001"
initial_value="0"
label="Rotation X:"
......@@ -563,7 +564,6 @@ width="678">
can_edit_text="true"
follows="left|top"
height="14"
enabled="false"
increment="0.001"
initial_value="0"
label="Rotation Y:"
......@@ -585,7 +585,6 @@ width="678">
can_edit_text="true"
follows="left|top"
height="14"
enabled="false"
increment="0.001"
initial_value="0"
label="Rotation Z:"
......@@ -636,6 +635,7 @@ width="678">
height="95"
layout="topleft"
left="0"
enabled="false"
title="Position"
name="position_panel"
top="0"
......@@ -735,6 +735,7 @@ width="678">
height="95"
layout="topleft"
left="0"
enabled="false"
title="Scale"
name="scale_panel"
top="0"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment