Hi there,
i’ve written a script that when you select a block the script recursively checks if the block is within another block then it keeps checking until it reaches the geometry level. I then apply a material to the layer within the block(s) by specifying the name of the material in “Material Name” and then check it’s texture size or manually input the values if it can’t find the texture size, i then use this to make sure the mapping is always proportional to the texture WxH and adjust the mapping with the sliders some more and preview the change before pressing “OK” finally in the eto form. So far the script has box mapping I will be implementing the cylindrical and sphere mapping. I was wondering if there was a way through python or another scripting language in rhino to access the “mapping widget”? It would be great if the widget could align with the geometry and be a uniform scale. I noticed with some geometries that the texture mapping had to be manually adjusted after running my script as there was some distortions in the texture so i had to rotate and move the mapping widget to the centre of the geometry. All geometries are polysurfaces in my rhino file.
attached is the script and a screen grab of how the mapping widget can look at times, most of the time it is positioned somewhere far away in the view port from the actual geometry and the rotation is almost always not aligned with the geomtry.
240214_Material on block with ui control.py (17.9 KB)
1 post - 1 participant
