.. | .. |
---|
5159 | 5159 | |
---|
5160 | 5160 | // System.out.println("Fullname = " + fullname); |
---|
5161 | 5161 | |
---|
5162 | | - if (fullname.name.indexOf(":") == -1) |
---|
5163 | | - return fullname.name; |
---|
| 5162 | + // Does not work on Windows due to C: |
---|
| 5163 | +// if (fullname.name.indexOf(":") == -1) |
---|
| 5164 | +// return fullname.name; |
---|
| 5165 | +// |
---|
| 5166 | +// return fullname.name.substring(0,fullname.name.indexOf(":")); |
---|
5164 | 5167 | |
---|
5165 | | - return fullname.name.substring(0,fullname.name.indexOf(":")); |
---|
| 5168 | + String[] split = fullname.name.split(":"); |
---|
| 5169 | + |
---|
| 5170 | + if (split.length == 0) |
---|
| 5171 | + { |
---|
| 5172 | + return ""; |
---|
| 5173 | + } |
---|
| 5174 | + |
---|
| 5175 | + if (split.length <= 2) |
---|
| 5176 | + { |
---|
| 5177 | + if (fullname.name.endsWith(":")) |
---|
| 5178 | + { |
---|
| 5179 | + // Windows |
---|
| 5180 | + return fullname.name.substring(0, fullname.name.length()-1); |
---|
| 5181 | + } |
---|
| 5182 | + |
---|
| 5183 | + return split[0]; |
---|
| 5184 | + } |
---|
| 5185 | + |
---|
| 5186 | + // Windows |
---|
| 5187 | + assert(split.length == 4); |
---|
| 5188 | + |
---|
| 5189 | + return split[0] + ":" + split[1]; |
---|
5166 | 5190 | } |
---|
5167 | 5191 | |
---|
5168 | 5192 | static String GetBump(cTexture fullname) |
---|
.. | .. |
---|
5171 | 5195 | return ""; |
---|
5172 | 5196 | |
---|
5173 | 5197 | // System.out.println("Fullname = " + fullname); |
---|
5174 | | - if (fullname.name.indexOf(":") == -1) |
---|
5175 | | - return ""; |
---|
5176 | | - |
---|
5177 | | - return fullname.name.substring(fullname.name.indexOf(":")+1,fullname.name.length()); |
---|
| 5198 | + // Does not work on Windows due to C: |
---|
| 5199 | +// if (fullname.name.indexOf(":") == -1) |
---|
| 5200 | +// return ""; |
---|
| 5201 | +// |
---|
| 5202 | +// return fullname.name.substring(fullname.name.indexOf(":")+1,fullname.name.length()); |
---|
| 5203 | + String[] split = fullname.name.split(":"); |
---|
| 5204 | + |
---|
| 5205 | + if (split.length == 0) |
---|
| 5206 | + { |
---|
| 5207 | + return ""; |
---|
| 5208 | + } |
---|
| 5209 | + |
---|
| 5210 | + if (split.length == 1) |
---|
| 5211 | + { |
---|
| 5212 | + return ""; |
---|
| 5213 | + } |
---|
| 5214 | + |
---|
| 5215 | + if (split.length == 2) |
---|
| 5216 | + { |
---|
| 5217 | + if (fullname.name.endsWith(":")) |
---|
| 5218 | + { |
---|
| 5219 | + // Windows |
---|
| 5220 | + return ""; |
---|
| 5221 | + } |
---|
| 5222 | + |
---|
| 5223 | + return split[1]; |
---|
| 5224 | + } |
---|
| 5225 | + |
---|
| 5226 | + // Windows |
---|
| 5227 | + assert(split.length == 4); |
---|
| 5228 | + |
---|
| 5229 | + return split[2] + ":" + split[3]; |
---|
5178 | 5230 | } |
---|
5179 | 5231 | |
---|
5180 | 5232 | String GetPigmentTexture() |
---|
.. | .. |
---|
5248 | 5300 | System.out.print("; textures = " + textures); |
---|
5249 | 5301 | System.out.println("; usedtextures = " + usedtextures); |
---|
5250 | 5302 | |
---|
5251 | | - if (GetTextures() == null) |
---|
| 5303 | + if (GetTextures() == null) // What is that?? |
---|
5252 | 5304 | GetTextures().name = ":"; |
---|
5253 | 5305 | |
---|
5254 | 5306 | String texname = tex; |
---|
.. | .. |
---|
7378 | 7430 | objectUI.closeUI(); |
---|
7379 | 7431 | if (editWindow != null) |
---|
7380 | 7432 | { |
---|
| 7433 | + editWindow.ctrlPanel.FlushUI(); |
---|
7381 | 7434 | editWindow.refreshContents(); |
---|
7382 | 7435 | } // ? new |
---|
7383 | 7436 | objectUI = null; |
---|