Browse Source

Merge pull request #1093 from LumaDigital/JS-MaterialTextureReferenceFix

- Material inspector now removes references to textures correctly
JoshEngebretson 9 years ago
parent
commit
72824a6ae2
1 changed files with 1 additions and 2 deletions
  1. 1 2
      Script/AtomicEditor/ui/frames/inspector/MaterialInspector.ts

+ 1 - 2
Script/AtomicEditor/ui/frames/inspector/MaterialInspector.ts

@@ -279,8 +279,6 @@ class MaterialInspector extends ScriptWidget {
             if (texture) {
             if (texture) {
                 inspector.material.setTexture(textureUnit, texture);
                 inspector.material.setTexture(textureUnit, texture);
                 textureWidget.texture = inspector.getTextureThumbnail(texture);
                 textureWidget.texture = inspector.getTextureThumbnail(texture);
-
-                this.sendEvent(EditorEvents.InspectorProjectReference, { "path": texture.getName() });
             }
             }
 
 
         });
         });
@@ -324,6 +322,7 @@ class MaterialInspector extends ScriptWidget {
 
 
         if (texture != null && textureWidget != null) {
         if (texture != null && textureWidget != null) {
             textureWidget.setTexture(null);
             textureWidget.setTexture(null);
+            this.material.setTexture(textureUnit, null);
         }
         }
 
 
     }
     }