Skip to content

Commit e66bcfe

Browse files
committed
Editor: Fix material browser.
1 parent 1499ef3 commit e66bcfe

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

editor/css/main.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,4 +661,12 @@ select {
661661
background: #222;
662662
}
663663

664+
.Listbox .ListboxItem:hover {
665+
background-color: rgba(21,60,94,0.5);
666+
}
667+
668+
.Listbox .ListboxItem.active {
669+
background-color: rgba(21,60,94,1);
670+
}
671+
664672
}

editor/js/Sidebar.Material.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,13 +603,14 @@ var SidebarMaterial = function ( editor ) {
603603

604604
material = new materialClasses[ materialClass.getValue() ]();
605605

606-
if ( material.type == "RawShaderMaterial" ) {
606+
if ( material.type === "RawShaderMaterial" ) {
607607

608608
material.vertexShader = vertexShaderVariables + material.vertexShader;
609609

610610
}
611611

612612
editor.execute( new SetMaterialCommand( editor, currentObject, material, currentMaterialSlot ), 'New Material: ' + materialClass.getValue() );
613+
editor.addMaterial( material );
613614
// TODO Copy other references in the scene graph
614615
// keeping name and UUID then.
615616
// Also there should be means to create a unique

0 commit comments

Comments
 (0)