.. | .. |
---|
2300 | 2300 | { |
---|
2301 | 2301 | if (newWindow) |
---|
2302 | 2302 | { |
---|
| 2303 | + new Exception().printStackTrace(); |
---|
2303 | 2304 | System.exit(0); |
---|
2304 | 2305 | if (parent != null) |
---|
2305 | 2306 | { |
---|
.. | .. |
---|
2906 | 2907 | { |
---|
2907 | 2908 | if (bRep != null) |
---|
2908 | 2909 | { |
---|
2909 | | - bRep.GenUV(); |
---|
| 2910 | + bRep.GenUV(); //1); |
---|
| 2911 | + //bRep.UnfoldUV(); |
---|
2910 | 2912 | Touch(); |
---|
2911 | 2913 | } |
---|
2912 | 2914 | } |
---|
.. | .. |
---|
5157 | 5159 | |
---|
5158 | 5160 | // System.out.println("Fullname = " + fullname); |
---|
5159 | 5161 | |
---|
5160 | | - if (fullname.name.indexOf(":") == -1) |
---|
5161 | | - 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(":")); |
---|
5162 | 5167 | |
---|
5163 | | - 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]; |
---|
5164 | 5190 | } |
---|
5165 | 5191 | |
---|
5166 | 5192 | static String GetBump(cTexture fullname) |
---|
.. | .. |
---|
5169 | 5195 | return ""; |
---|
5170 | 5196 | |
---|
5171 | 5197 | // System.out.println("Fullname = " + fullname); |
---|
5172 | | - if (fullname.name.indexOf(":") == -1) |
---|
5173 | | - return ""; |
---|
5174 | | - |
---|
5175 | | - 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]; |
---|
5176 | 5230 | } |
---|
5177 | 5231 | |
---|
5178 | 5232 | String GetPigmentTexture() |
---|
.. | .. |
---|
5246 | 5300 | System.out.print("; textures = " + textures); |
---|
5247 | 5301 | System.out.println("; usedtextures = " + usedtextures); |
---|
5248 | 5302 | |
---|
5249 | | - if (GetTextures() == null) |
---|
| 5303 | + if (GetTextures() == null) // What is that?? |
---|
5250 | 5304 | GetTextures().name = ":"; |
---|
5251 | 5305 | |
---|
5252 | 5306 | String texname = tex; |
---|
.. | .. |
---|
5898 | 5952 | return; |
---|
5899 | 5953 | } |
---|
5900 | 5954 | |
---|
| 5955 | + //bRep.GenUV(1/material.diffuseness); |
---|
5901 | 5956 | // bRep.lock = true; |
---|
5902 | 5957 | |
---|
5903 | 5958 | //javax.media.opengl.GL gl = display.GetGL(); |
---|
.. | .. |
---|
7375 | 7430 | objectUI.closeUI(); |
---|
7376 | 7431 | if (editWindow != null) |
---|
7377 | 7432 | { |
---|
| 7433 | + editWindow.ctrlPanel.FlushUI(); |
---|
7378 | 7434 | editWindow.refreshContents(); |
---|
7379 | 7435 | } // ? new |
---|
7380 | 7436 | objectUI = null; |
---|