• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

Revisioned07a711379d4a20c07ffce6de019a31f63f3948 (tree)
Time2013-03-06 01:00:43
Authorbrentowens@gmail.com <brentowens@gmai...>
Commiterbrentowens@gmail.com

Log Message

speaking of SDK, material property editor is now sorted alphabetically

git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@10464 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

Change Summary

Incremental Difference

--- a/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialPropertyEditor.java
+++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialPropertyEditor.java
@@ -46,8 +46,11 @@ import java.awt.Rectangle;
4646 import java.beans.PropertyChangeEvent;
4747 import java.beans.PropertyChangeListener;
4848 import java.beans.PropertyEditor;
49+import java.util.Arrays;
50+import java.util.Collections;
4951 import java.util.Iterator;
5052 import java.util.LinkedList;
53+import java.util.List;
5154 import java.util.concurrent.Callable;
5255 import java.util.concurrent.ExecutionException;
5356 import org.openide.filesystems.FileObject;
@@ -167,7 +170,10 @@ public class MaterialPropertyEditor implements PropertyEditor, SceneExplorerProp
167170 return new String[]{};
168171 }
169172 if (material.getAssetName() == null) {
170- String[] materials = request.getManager().getMaterials();
173+ String[] matsUnsorted = request.getManager().getMaterials();
174+ List<String> matList = Arrays.asList(matsUnsorted);
175+ Collections.sort(matList);
176+ String[] materials = matList.toArray(new String[0]);
171177 String[] mats = new String[materials.length + 1];
172178 mats[0] = ("create j3m file");
173179 for (int i = 0; i < materials.length; i++) {
@@ -176,7 +182,10 @@ public class MaterialPropertyEditor implements PropertyEditor, SceneExplorerProp
176182 }
177183 return mats;
178184 } else {
179- return request.getManager().getMaterials();
185+ String[] matsUnsorted = request.getManager().getMaterials();
186+ List<String> matList = Arrays.asList(matsUnsorted);
187+ Collections.sort(matList);
188+ return matList.toArray(new String[0]);
180189 }
181190 }
182191
--- a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/AddTerrainAction.java
+++ b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/AddTerrainAction.java
@@ -127,6 +127,9 @@ public class AddTerrainAction extends AbstractNewSpatialWizardAction {
127127 for (int w=0; w<alphaTextureSize; w++)
128128 alphaBlend.setRGB(w, h, 0x00FF0000);//argb
129129 }
130+ File textureFolder = new File(assetFolder+"/Textures/");
131+ if (!textureFolder.exists())
132+ textureFolder.mkdir();
130133 File alphaFolder = new File(assetFolder+"/Textures/terrain-alpha/");
131134 if (!alphaFolder.exists())
132135 alphaFolder.mkdir();