/** * If the {@link GlTF#getExtensionsUsed() used extensions} of the given * {@link GlTF} is <code>null</code> or does not contain the given * extension name, then it will be set to a new list that contains all * previous extension names, and the given one. * * @param gltf The {@link GlTF} * @param extensionName The name of the extension to add */ public static void addExtensionUsed(GlTF gltf, String extensionName) { List<String> oldExtensionsUsed = gltf.getExtensionsUsed(); if (oldExtensionsUsed == null || !oldExtensionsUsed.contains(extensionName)) { gltf.addExtensionsUsed(extensionName); } }