Skip to content

Commit 3848529

Browse files
committed
Editor: Made reflectivity independent from envMap. Fixes temporarily immutable material.side bug.
1 parent 96aecf6 commit 3848529

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

editor/js/Sidebar.Material.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,15 @@ Sidebar.Material = function ( editor ) {
746746

747747
}
748748

749-
if ( material.reflectivity !== materialReflectivity.getValue() ) {
749+
}
750+
751+
if ( material.reflectivity !== undefined ) {
752+
753+
var reflectivity = materialReflectivity.getValue();
754+
755+
if ( material.reflectivity !== reflectivity ) {
750756

751-
editor.execute( new SetMaterialValueCommand( currentObject, 'reflectivity', materialReflectivity.getValue() ) );
757+
editor.execute( new SetMaterialValueCommand( currentObject, 'reflectivity', reflectivity ) );
752758

753759
}
754760

@@ -1126,6 +1132,10 @@ Sidebar.Material = function ( editor ) {
11261132

11271133
}
11281134

1135+
}
1136+
1137+
if ( material.reflectivity !== undefined ) {
1138+
11291139
materialReflectivity.setValue( material.reflectivity );
11301140

11311141
}

0 commit comments

Comments
 (0)