mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 11:37:58 +02:00
bind 'is soft' to backend API, always show 'Hips' for soften entity
This commit is contained in:
parent
da68a8906e
commit
56194bba8e
1 changed files with 23 additions and 4 deletions
|
@ -48,11 +48,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
wearablesCombobox.model.append(wearable);
|
wearablesCombobox.model.append(wearable);
|
||||||
}
|
}
|
||||||
|
|
||||||
wearablesCombobox.currentIndex = 0;
|
wearablesCombobox.currentIndex = 0;
|
||||||
if(wearablesCombobox.model.count !== 0) {
|
|
||||||
jointsCombobox.set(getCurrentWearable().parentJointIndex)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshWearable(wearableID, wearableIndex, properties, updateUI) {
|
function refreshWearable(wearableID, wearableIndex, properties, updateUI) {
|
||||||
|
@ -176,6 +172,7 @@ Rectangle {
|
||||||
rotation.set(currentWearable.localRotationAngles);
|
rotation.set(currentWearable.localRotationAngles);
|
||||||
scalespinner.set(currentWearable.dimensions.x / currentWearable.naturalDimensions.x)
|
scalespinner.set(currentWearable.dimensions.x / currentWearable.naturalDimensions.x)
|
||||||
jointsCombobox.set(currentWearable.parentJointIndex)
|
jointsCombobox.set(currentWearable.parentJointIndex)
|
||||||
|
isSoft.set(currentWearable.relayParentJoints)
|
||||||
|
|
||||||
wearableSelected(currentWearable.id);
|
wearableSelected(currentWearable.id);
|
||||||
}
|
}
|
||||||
|
@ -197,6 +194,8 @@ Rectangle {
|
||||||
id: jointsCombobox
|
id: jointsCombobox
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
enabled: !isSoft.checked
|
||||||
|
comboBox.displayText: isSoft.checked ? 'Hips' : comboBox.currentText
|
||||||
|
|
||||||
model: jointNames
|
model: jointNames
|
||||||
property bool notify: false
|
property bool notify: false
|
||||||
|
@ -350,11 +349,31 @@ Rectangle {
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
HifiControlsUit.CheckBox {
|
HifiControlsUit.CheckBox {
|
||||||
|
id: isSoft
|
||||||
text: "Is soft"
|
text: "Is soft"
|
||||||
labelFontSize: 15
|
labelFontSize: 15
|
||||||
labelFontWeight: Font.Bold
|
labelFontWeight: Font.Bold
|
||||||
color: Qt.black
|
color: Qt.black
|
||||||
y: scalespinner.y
|
y: scalespinner.y
|
||||||
|
|
||||||
|
function set(value) {
|
||||||
|
notify = false;
|
||||||
|
checked = value
|
||||||
|
notify = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function notifyIsSoftChanged() {
|
||||||
|
modified = true;
|
||||||
|
var properties = {
|
||||||
|
relayParentJoints: checked
|
||||||
|
};
|
||||||
|
|
||||||
|
wearableUpdated(getCurrentWearable().id, wearablesCombobox.currentIndex, properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
property bool notify: false;
|
||||||
|
|
||||||
|
onCheckedChanged: if(notify) notifyIsSoftChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
|
Loading…
Reference in a new issue