Преглед изворни кода

Editor: hide rotation and scale widgets for lights and targets.

alteredq пре 12 година
родитељ
комит
43d066dd3c
1 измењених фајлова са 19 додато и 0 уклоњено
  1. 19 0
      editor/js/ui/Sidebar.Object3D.js

+ 19 - 0
editor/js/ui/Sidebar.Object3D.js

@@ -265,6 +265,24 @@ Sidebar.Object3D = function ( signals ) {
 
 	}
 
+	function updateTransformRows() {
+
+		if ( selected instanceof THREE.Light || ( selected instanceof THREE.Object3D && selected.properties.targetInverse ) ) {
+
+			objectRotationRow.setDisplay( 'none' );
+			objectScaleRow.setDisplay( 'none' );
+			objectScaleLockRow.setDisplay( 'none' );
+
+		} else {
+
+			objectRotationRow.setDisplay( '' );
+			objectScaleRow.setDisplay( '' );
+			objectScaleLockRow.setDisplay( '' );
+
+		}
+
+	}
+
 	function getObjectInstanceName( object ) {
 
 		for ( var key in objects ) {
@@ -334,6 +352,7 @@ Sidebar.Object3D = function ( signals ) {
 			objectVisible.setValue( object.visible );
 
 			updateRows();
+			updateTransformRows();
 
 		} else {