Parcourir la source

Merge pull request #527 from Azaezel/alpha40/stopTheBleeding_Materials

suppress deletion of temp material created by the editor
Brian Roberts il y a 4 ans
Parent
commit
c9d2ec0f56

+ 2 - 2
Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript

@@ -47,7 +47,7 @@ function MaterialEditorGui::establishMaterials(%this)
    singleton CustomMaterial( materialEd_justAlphaMaterial )
    {
       mapTo = "matEd_mappedMatB";
-      texture[0] = materialEd_previewMaterial.diffuseMap[0];
+      texture[0] = materialEd_previewMaterial.getdiffuseMap(0);
    };
 
    //Custom shader to allow the display of just the alpha channel. 
@@ -176,7 +176,7 @@ function MaterialEditorGui::quit(%this)
    // Now we can delete the preview materials and shaders
    // knowing that there are no matinstances using them.
    matEdCubeMapPreviewMat.delete();
-   materialEd_previewMaterial.delete();
+   //materialEd_previewMaterial.delete();
    materialEd_justAlphaMaterial.delete();
    materialEd_justAlphaShader.delete();
 }