/** * This method loads the properties if they are available and defined for the structure. * * @param structure the structure we read the properties from * @param blenderContext the blender context * @return loaded properties or null if they are not available * @throws BlenderFileException an exception is thrown when the blend file is somehow corrupted */ protected Properties loadProperties(Structure structure, BlenderContext blenderContext) throws BlenderFileException { Properties properties = null; Structure id = (Structure) structure.getFieldValue("ID"); if (id != null) { Pointer pProperties = (Pointer) id.getFieldValue("properties"); if (pProperties.isNotNull()) { Structure propertiesStructure = pProperties.fetchData().get(0); properties = new Properties(); properties.load(propertiesStructure, blenderContext); } } return properties; }