Print at Dec 15, 2025, 5:06:58 PM

Posted by jrmobile at Aug 17, 2021, 2:59:35 PM
Re: How do i Change Texture in Plugin?
I've made it.
If anyone need, i just leave it here

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);
}
}