Bugfix: fixed a bug that caused NPE during vertex groups loading when
mesh block was saved without its parent.
This commit is contained in:
parent
32be69f3e6
commit
be3dc06e28
@ -286,6 +286,8 @@ public class MeshHelper extends AbstractBlenderHelper {
|
||||
List<Map<String, Float>> result = new ArrayList<Map<String, Float>>();
|
||||
|
||||
Structure parent = blenderContext.peekParent();
|
||||
if(parent != null) {
|
||||
// the mesh might be saved without its parent (it is then unused)
|
||||
Structure defbase = (Structure) parent.getFieldValue("defbase");
|
||||
List<String> groupNames = new ArrayList<String>();
|
||||
List<Structure> defs = defbase.evaluateListBase();
|
||||
@ -312,6 +314,7 @@ public class MeshHelper extends AbstractBlenderHelper {
|
||||
result.add(weightsForVertex);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user