Re: How do i Change Texture in Plugin?
Code: Select all
TexturesCatalog texturesCatalog = userPreferences.getTexturesCatalog();
java.util.List<TexturesCategory> texturesCategories = texturesCatalog.getCategories();
TexturesCategory garderobCategory = null;
for (TexturesCategory category : texturesCategories) {
if (category.getName().matches("ЛДСП")) {
garderobCategory = category;
}
}
java.util.List<CatalogTexture> garderobTextures = garderobCategory.getTextures();
for (CatalogTexture catalogTexture : garderobTextures)
{
if (catalogTexture.getName().matches(ldspColor)) {
HomeTexture texture = new HomeTexture(catalogTexture);
model.setTexture(texture);
}
}