Main repository of MikuMikuStudio
Revision | 614b40d885272bf23de36225ce1d372b8ad9f8bd (tree) |
---|---|
Time | 2013-07-06 15:09:05 |
Author | kobayasi <kobayasi@pscn...> |
Commiter | kobayasi |
add name property to Material
@@ -104,6 +104,7 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material> | ||
104 | 104 | additiveLight.setDepthWrite(false); |
105 | 105 | } |
106 | 106 | private AssetKey key; |
107 | + private String name; | |
107 | 108 | private MaterialDef def; |
108 | 109 | private ListMap<String, MatParam> paramValues = new ListMap<String, MatParam>(); |
109 | 110 | private Technique technique; |
@@ -153,6 +154,23 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material> | ||
153 | 154 | return key != null ? key.getName() : null; |
154 | 155 | } |
155 | 156 | |
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 | + | |
156 | 174 | public void setKey(AssetKey key) { |
157 | 175 | this.key = key; |
158 | 176 | } |