From 98a02c1ac6f189aba93d7cce64ba5bdbc0617f6c Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 20 Mar 2012 16:26:52 -0700 Subject: Bug Fixes for Canvas & WebGL File IO --- js/models/materials-model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/models') diff --git a/js/models/materials-model.js b/js/models/materials-model.js index a45b0c72..9c692f45 100755 --- a/js/models/materials-model.js +++ b/js/models/materials-model.js @@ -112,7 +112,7 @@ exports.MaterialsModel = Montage.create(Component, { value: function (materialName) { var index = this.getIndexOfMaterial(materialName); if(index !== -1) { - return this._materials[index]; + return this._materials[index].dup(); } } }, @@ -123,7 +123,7 @@ exports.MaterialsModel = Montage.create(Component, { { var index = this.getIndexOfMaterialByShader( shaderName ); if (index >= 0) - return this._materials[index]; + return this._materials[index].dup(); } }, -- cgit v1.2.3