Main repository of MikuMikuStudio
Revisión | f367e02ea985ded763495b431ac8c739f6afe8b4 (tree) |
---|---|
Tiempo | 2013-07-08 06:17:30 |
Autor | remy.bouquet@gmail.com <remy.bouquet@gmai...> |
Commiter | remy.bouquet@gmail.com |
- Fixed issue introduced in last change of Mesh write method. Hardware Skinning buffers were not properly ignored at save time in some rare cases, and were causing a crash
git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@10697 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
@@ -1329,29 +1329,25 @@ public class Mesh implements Savable, Cloneable { | ||
1329 | 1329 | //Removing HW skinning buffers to not save them |
1330 | 1330 | VertexBuffer hwBoneIndex = null; |
1331 | 1331 | VertexBuffer hwBoneWeight = null; |
1332 | - if (isAnimated()) { | |
1333 | - hwBoneIndex = getBuffer(Type.HWBoneIndex); | |
1334 | - if (hwBoneIndex != null) { | |
1335 | - buffers.remove(Type.HWBoneIndex.ordinal()); | |
1336 | - } | |
1337 | - hwBoneWeight = getBuffer(Type.HWBoneWeight); | |
1338 | - if (hwBoneWeight != null) { | |
1339 | - buffers.remove(Type.HWBoneWeight.ordinal()); | |
1340 | - } | |
1332 | + hwBoneIndex = getBuffer(Type.HWBoneIndex); | |
1333 | + if (hwBoneIndex != null) { | |
1334 | + buffers.remove(Type.HWBoneIndex.ordinal()); | |
1341 | 1335 | } |
1342 | - | |
1336 | + hwBoneWeight = getBuffer(Type.HWBoneWeight); | |
1337 | + if (hwBoneWeight != null) { | |
1338 | + buffers.remove(Type.HWBoneWeight.ordinal()); | |
1339 | + } | |
1340 | + | |
1343 | 1341 | out.writeIntSavableMap(buffers, "buffers", null); |
1344 | - | |
1342 | + | |
1345 | 1343 | //restoring Hw skinning buffers. |
1346 | - if (isAnimated()) { | |
1347 | - if (hwBoneIndex != null) { | |
1348 | - buffers.put(hwBoneIndex.getBufferType().ordinal(), hwBoneIndex); | |
1349 | - } | |
1350 | - if (hwBoneWeight != null) { | |
1351 | - buffers.put(hwBoneWeight.getBufferType().ordinal(), hwBoneWeight); | |
1352 | - } | |
1344 | + if (hwBoneIndex != null) { | |
1345 | + buffers.put(hwBoneIndex.getBufferType().ordinal(), hwBoneIndex); | |
1353 | 1346 | } |
1354 | - | |
1347 | + if (hwBoneWeight != null) { | |
1348 | + buffers.put(hwBoneWeight.getBufferType().ordinal(), hwBoneWeight); | |
1349 | + } | |
1350 | + | |
1355 | 1351 | out.write(lodLevels, "lodLevels", null); |
1356 | 1352 | } |
1357 | 1353 |