File tree 1 file changed +9
-1
lines changed
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1153,8 +1153,16 @@ private void setupControls() {
1153
1153
if (bw == null || bw .attachedSpatial == null ) {
1154
1154
continue ;
1155
1155
}
1156
+ String jointName = bw .joint .getName ();
1156
1157
SkinData skinData = fetchFromCache ("skins" , bw .skinIndex , SkinData .class );
1157
- skinData .skinningControl .getAttachmentsNode (bw .joint .getName ()).attachChild (bw .attachedSpatial );
1158
+ SkinningControl skinControl = skinData .skinningControl ;
1159
+ if (skinControl .getSpatial () == null ) {
1160
+ logger .log (Level .WARNING ,
1161
+ "No skinned Spatial for joint \" {0}\" -- will skin the model's root node!" ,
1162
+ jointName );
1163
+ rootNode .addControl (skinControl );
1164
+ }
1165
+ skinControl .getAttachmentsNode (jointName ).attachChild (bw .attachedSpatial );
1158
1166
}
1159
1167
}
1160
1168
You can’t perform that action at this time.
0 commit comments