Mapping a texture with python


#1

Hi, I need to mapping a texture with a script. is there any way? I can add a material to an object but I can’t mapping it!


(Dale Fugier) #2

How about this:

Rhino.DocObjects.Material mat = new Rhino.DocObjects.Material();
mat.SetBitmapTexture(filename);

#3

Hi @dale,
thanks, but Daniele (he’s friend of mine) would ask how to manage Texture Mapping coordinates not how to select the texture(image).

Could you show us an example?

Thanks
Riccardo


(Dale Fugier) #4

I don’t believe you can do texture mapping, as you describe, in RhinoCommon yet. I know it is being worked on. Perhaps on a service release or two, we can provide this function and, thus, an SDK sample.


#5

Thanks @dale,
so, at the moment, the only solution it’s via R.Command .
It’s not a big issue for me but I would prefer to have as py scripting option.

Could, you, please add this features to the list?
Ciao
Riccardo