Browse Source

Update code style

Temdog007 6 years ago
parent
commit
cc96ff0692
1 changed files with 5 additions and 4 deletions
  1. 5 4
      editor/js/Sidebar.Material.js

+ 5 - 4
editor/js/Sidebar.Material.js

@@ -624,12 +624,13 @@ Sidebar.Material = function ( editor ) {
 
 			}
 
-			if ( material.depthPacking !== undefined) {
+			if ( material.depthPacking !== undefined ) {
+
+				var depthPacking = parseInt( materialDepthPacking.getValue() );
+				if ( material.depthPacking !== depthPacking ) {
 
-				var depthPacking = parseInt(materialDepthPacking.getValue());
-				if(material.depthPacking !== depthPacking)
-				{
 					editor.execute( new SetMaterialValueCommand( currentObject, 'depthPacking', depthPacking, currentMaterialSlot ) );
+
 				}
 
 			}