Open Tamacun opened 3 years ago
Can you provide some example materials to go along with this?
Can you provide some example materials to go along with this?
Sure. Mats.zip
Logged as: SKEXT-2933
Hi, is there any progress on this bug? This is very annoying for me as well. I don't have any scripts running at all.
To reproduce with me, I imported textures into sketchup using the link found here: https://3dwarehouse.sketchup.com/model/12caa5ffb27ae6aac2e6b25689767769/akb-Wood-Species-wood-materials-texture-bonus-pack?hl=en
The reason this bug is so annoying is that...once a texture is renamed to \<auto> it shares the name as all the other textures named to \<auto> and thus, I can no longer switch between textures in Sketchup because they all have the same name.
I am running Mac Mohave 10.14 and Sketchup Pro Version 21.0.392.
Do you think the problem is caused by the #unique_name
method? If so, see if you can code a workaround.
A Ruby script is used to create many Sketchup Materials and save them as .skm files. The .skm files are created, named uniquely, and when placed in Application Support/Sketchup 2020/Sketchup/Materials/Test Folder, they load into Sketchup Materials browser successfully and are named properly on Hover.
The first material selected by clicking on it in the Material Browser will load into paint bucket. This is confirmed using materials.current.
Issue 1 Once the material is applied to a face (or group) the material will display in the "Colors in Model" with the appropriate thumbnail, however the on Hover name is shown as <auto>. This is confirmed using material.name in the Ruby Console of the active model.
Issue 2 Additionally, once the first material has been selected, no other materials created using the API can be applied. This is confirmed using the materials.current after selecting the 2nd material. If the user tries to select a 2nd material, once they click on a face (or group) the 1st material will be applied.
It is expected that since these materials have unique .display_name, .name, and texture images, they should be able to be used as any other manually created texture, and their name should remain the same once added to the active model.
I will readily admit that my Ruby proficiency is lacking however, I was directed here after seeking help on the Sketchup API forum.
Thank you in advance to all the contributors in the community and those working in an official capacity.