File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1153,8 +1153,16 @@ private void setupControls() {
11531153 if (bw == null || bw .attachedSpatial == null ) {
11541154 continue ;
11551155 }
1156+ String jointName = bw .joint .getName ();
11561157 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 );
11581166 }
11591167 }
11601168
You can’t perform that action at this time.
0 commit comments