mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 23:33:48 +02:00
Merge pull request #13897 from ElderOrb/filter_out_hands_from_joints
filter out left/right hands from joints list in avatarapp
This commit is contained in:
commit
299e9d0d38
2 changed files with 26 additions and 6 deletions
|
@ -46,7 +46,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
property var jointNames;
|
||||
property var jointNames: []
|
||||
property var currentAvatarSettings;
|
||||
|
||||
function fetchAvatarModelName(marketId, avatar) {
|
||||
|
|
|
@ -25,7 +25,17 @@ Rectangle {
|
|||
modified = false;
|
||||
}
|
||||
|
||||
property var jointNames;
|
||||
property var jointNames: []
|
||||
onJointNamesChanged: {
|
||||
jointsModel.clear();
|
||||
for (var i = 0; i < jointNames.length; ++i) {
|
||||
var jointName = jointNames[i];
|
||||
if (jointName !== 'LeftHand' && jointName !== 'RightHand') {
|
||||
jointsModel.append({'text' : jointName, 'jointIndex' : i});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property string avatarName: ''
|
||||
property var wearablesModel;
|
||||
|
||||
|
@ -268,20 +278,30 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
enabled: getCurrentWearable() !== null && !isSoft.checked
|
||||
comboBox.displayText: isSoft.checked ? 'Hips' : comboBox.currentText
|
||||
comboBox.textRole: "text"
|
||||
|
||||
model: jointNames
|
||||
model: ListModel {
|
||||
id: jointsModel
|
||||
}
|
||||
property bool notify: false
|
||||
|
||||
function set(jointIndex) {
|
||||
notify = false;
|
||||
currentIndex = jointIndex;
|
||||
for (var i = 0; i < jointsModel.count; ++i) {
|
||||
if (jointsModel.get(i).jointIndex === jointIndex) {
|
||||
currentIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
notify = true;
|
||||
}
|
||||
|
||||
function notifyJointChanged() {
|
||||
modified = true;
|
||||
var jointIndex = jointsModel.get(jointsCombobox.currentIndex).jointIndex;
|
||||
|
||||
var properties = {
|
||||
parentJointIndex: currentIndex,
|
||||
parentJointIndex: jointIndex,
|
||||
localPosition: {
|
||||
x: positionVector.xvalue,
|
||||
y: positionVector.yvalue,
|
||||
|
@ -294,7 +314,7 @@ Rectangle {
|
|||
}
|
||||
};
|
||||
|
||||
wearableUpdated(getCurrentWearable().id, wearablesCombobox.currentIndex, properties);
|
||||
wearableUpdated(getCurrentWearable().id, jointIndex, properties);
|
||||
}
|
||||
|
||||
onCurrentIndexChanged: {
|
||||
|
|
Loading…
Reference in a new issue