Fix rotation tool issue
This commit is contained in:
parent
59a4fe1836
commit
5f5d1574e5
@ -693,14 +693,14 @@
|
||||
if (scope.elements.length == 0) return;
|
||||
|
||||
if (object) {
|
||||
worldRotation.setFromRotationMatrix( tempMatrix.extractRotation( object.matrixWorld ) );
|
||||
if (!this.dragging) worldRotation.setFromRotationMatrix( tempMatrix.extractRotation( object.matrixWorld ) );
|
||||
if (Toolbox.selected.transformerMode === 'rotate') {
|
||||
_gizmo[ _mode ].update( worldRotation, eye );
|
||||
this.rotation.set(0, 0, 0);
|
||||
} else {
|
||||
object.getWorldQuaternion(this.rotation)
|
||||
}
|
||||
if (this.rotation_selection) {
|
||||
if (this.rotation_selection.x || this.rotation_selection.y || this.rotation_selection.z) {
|
||||
let q = Reusable.quat1.setFromEuler(this.rotation_selection);
|
||||
this.quaternion.multiply(q);
|
||||
worldRotation.setFromQuaternion(this.quaternion);
|
||||
|
@ -1733,8 +1733,8 @@ Interface.definePanels(function() {
|
||||
let elements = UVEditor.getMappableElements();
|
||||
if (elements.length) {
|
||||
for (let element of elements) {
|
||||
let face = element.faces[this.selected_faces[0] || Object.keys(element.faces)[0]];
|
||||
texture = face.getTexture() || texture;
|
||||
let face = element.faces[ this.selected_faces[0] || Object.keys(element.faces)[0] ];
|
||||
if (face) texture = face.getTexture() || texture;
|
||||
if (texture) break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user