speaking of SDK, material property editor is now sorted alphabetically
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10464 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
3888036176
commit
b1657e6846
@ -46,8 +46,11 @@ import java.awt.Rectangle;
|
|||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.beans.PropertyEditor;
|
import java.beans.PropertyEditor;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import org.openide.filesystems.FileObject;
|
import org.openide.filesystems.FileObject;
|
||||||
@ -167,7 +170,10 @@ public class MaterialPropertyEditor implements PropertyEditor, SceneExplorerProp
|
|||||||
return new String[]{};
|
return new String[]{};
|
||||||
}
|
}
|
||||||
if (material.getAssetName() == null) {
|
if (material.getAssetName() == null) {
|
||||||
String[] materials = request.getManager().getMaterials();
|
String[] matsUnsorted = request.getManager().getMaterials();
|
||||||
|
List<String> matList = Arrays.asList(matsUnsorted);
|
||||||
|
Collections.sort(matList);
|
||||||
|
String[] materials = matList.toArray(new String[0]);
|
||||||
String[] mats = new String[materials.length + 1];
|
String[] mats = new String[materials.length + 1];
|
||||||
mats[0] = ("create j3m file");
|
mats[0] = ("create j3m file");
|
||||||
for (int i = 0; i < materials.length; i++) {
|
for (int i = 0; i < materials.length; i++) {
|
||||||
@ -176,7 +182,10 @@ public class MaterialPropertyEditor implements PropertyEditor, SceneExplorerProp
|
|||||||
}
|
}
|
||||||
return mats;
|
return mats;
|
||||||
} else {
|
} else {
|
||||||
return request.getManager().getMaterials();
|
String[] matsUnsorted = request.getManager().getMaterials();
|
||||||
|
List<String> matList = Arrays.asList(matsUnsorted);
|
||||||
|
Collections.sort(matList);
|
||||||
|
return matList.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,6 +127,9 @@ public class AddTerrainAction extends AbstractNewSpatialWizardAction {
|
|||||||
for (int w=0; w<alphaTextureSize; w++)
|
for (int w=0; w<alphaTextureSize; w++)
|
||||||
alphaBlend.setRGB(w, h, 0x00FF0000);//argb
|
alphaBlend.setRGB(w, h, 0x00FF0000);//argb
|
||||||
}
|
}
|
||||||
|
File textureFolder = new File(assetFolder+"/Textures/");
|
||||||
|
if (!textureFolder.exists())
|
||||||
|
textureFolder.mkdir();
|
||||||
File alphaFolder = new File(assetFolder+"/Textures/terrain-alpha/");
|
File alphaFolder = new File(assetFolder+"/Textures/terrain-alpha/");
|
||||||
if (!alphaFolder.exists())
|
if (!alphaFolder.exists())
|
||||||
alphaFolder.mkdir();
|
alphaFolder.mkdir();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user