Skip to content

Commit

Permalink
Merge pull request #430 from MeFisto94/ShaderNodes
Browse files Browse the repository at this point in the history
Improved ShaderNodes, fixed some issues with error management and crash when selecting some nodes
  • Loading branch information
Nehon committed Feb 28, 2016
2 parents 013fd08 + a920d9c commit 963bbd4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public String getShaderCode(String version, Shader.ShaderType type) {
return "";
} catch (Exception e) {
Exceptions.printStackTrace(e);
return "error generating shader " + e.getMessage();
return "Error generating shader: " + e.getMessage();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public MatDefDataObject(FileObject pf, MultiFileLoader loader) throws DataObject
findAssetManager();
final MatDefMetaData metaData = new MatDefMetaData(this);
lookupContents.add(metaData);
lookupContents.add(new MatDefNavigatorPanel());
pf.addFileChangeListener(new FileChangeAdapter() {
@Override
public void fileChanged(FileEvent fe) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void run() {
});
}

private int lastErrorHash = 0;
private static int lastErrorHash = 0;

private void smartLog(String expText, String message) {
int hash = message.hashCode();
Expand Down Expand Up @@ -183,7 +183,8 @@ public Material reloadMaterial(Material mat) {
//compilation error, the shader code will be output to the console
//the following code will output the error
//System.err.println(e.getMessage());
Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.SEVERE, e.getMessage());
//Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.SEVERE, e.getMessage());
smartLog("{0}", e.getMessage());

java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
Expand Down

0 comments on commit 963bbd4

Please sign in to comment.