Browse Source

Editor: Fixed receiveShadow lights bug.

Mr.doob 9 years ago
parent
commit
0539ea12e8
1 changed files with 7 additions and 3 deletions
  1. 7 3
      editor/js/Sidebar.Object3D.js

+ 7 - 3
editor/js/Sidebar.Object3D.js

@@ -474,10 +474,14 @@ Sidebar.Object3D = function ( editor ) {
 
 			}
 
-			if ( object.receiveShadow !== objectReceiveShadow.getValue() ) {
+			if ( object.receiveShadow !== undefined ) {
 
-				editor.execute( new SetValueCommand( object, 'receiveShadow', objectReceiveShadow.getValue() ) );
-				object.material.needsUpdate = true;
+				if ( object.receiveShadow !== objectReceiveShadow.getValue() ) {
+
+					editor.execute( new SetValueCommand( object, 'receiveShadow', objectReceiveShadow.getValue() ) );
+					object.material.needsUpdate = true;
+
+				}
 
 			}