• 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

Revision614b40d885272bf23de36225ce1d372b8ad9f8bd (tree)
Time2013-07-06 15:09:05
Authorkobayasi <kobayasi@pscn...>
Commiterkobayasi

Log Message

add name property to Material

Change Summary

Incremental Difference

--- a/engine/src/core/com/jme3/material/Material.java
+++ b/engine/src/core/com/jme3/material/Material.java
@@ -104,6 +104,7 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material>
104104 additiveLight.setDepthWrite(false);
105105 }
106106 private AssetKey key;
107+ private String name;
107108 private MaterialDef def;
108109 private ListMap<String, MatParam> paramValues = new ListMap<String, MatParam>();
109110 private Technique technique;
@@ -153,6 +154,23 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material>
153154 return key != null ? key.getName() : null;
154155 }
155156
157+ /**
158+ * @return the name of the material (not the same as the asset name), the returned value can be null
159+ */
160+ public String getName() {
161+ return name;
162+ }
163+
164+ /**
165+ * This method sets the name of the material.
166+ * The name is not the same as the asset name.
167+ * It can be null and there is no guarantee of its uniqness.
168+ * @param name the name of the material
169+ */
170+ public void setName(String name) {
171+ this.name = name;
172+ }
173+
156174 public void setKey(AssetKey key) {
157175 this.key = key;
158176 }