File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
jme3-core/src/main/java/com/jme3/anim Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -314,8 +314,8 @@ protected void controlRender(RenderManager rm, ViewPort vp) {
314
314
updateAnimationTargets (spatial );
315
315
316
316
// Prevent illegal cases. These should never happen.
317
- assert hwSkinningTested || (!hwSkinningTested && ! hwSkinningSupported && !hwSkinningEnabled );
318
- assert !hwSkinningEnabled || (hwSkinningEnabled && hwSkinningTested && hwSkinningSupported );
317
+ assert hwSkinningTested || (!hwSkinningSupported && !hwSkinningEnabled );
318
+ assert !hwSkinningEnabled || (hwSkinningTested && hwSkinningSupported );
319
319
320
320
if (hwSkinningPreferred && !hwSkinningTested ) {
321
321
// If hardware skinning is preferred and hasn't been tested yet, test it.
@@ -777,6 +777,14 @@ public void read(JmeImporter im) throws IOException {
777
777
super .read (im );
778
778
InputCapsule in = im .getCapsule (this );
779
779
armature = (Armature ) in .readSavable ("armature" , null );
780
+
781
+ for (MatParamOverride mpo : spatial .getLocalMatParamOverrides ().getArray ()) {
782
+ if (mpo .getName ().equals ("NumberOfBones" ) || mpo .getName ().equals ("BoneMatrices" )) {
783
+ spatial .removeMatParamOverride (mpo );
784
+ }
785
+ }
786
+ spatial .addMatParamOverride (numberOfJointsParam );
787
+ spatial .addMatParamOverride (jointMatricesParam );
780
788
}
781
789
782
790
/**
You can’t perform that action at this time.
0 commit comments