UV mappings in Rhino doc and 3dm file

At the moment, RhinoCommon doesn’t expose the UV mapping table—neither in RhinoDoc nor in File3dm.

Would it be possible to make this table accessible? Ideally with a Find method to retrieve specific mappings.

Also, it would be really useful to edit an existing UV mapping without having to create a new one, unless there’s a way to preserve the same ID. Keeping the ID consistent is key for tracking objects.

One more thing: RhinoDoc.TextureMappingEventArgs doesn’t include the object that owns the mapping. Could that info be added?

Anyone from McNeel able to help or confirm if this is being looked into for Rhino 8?

Thanks!

There is no table for UV mappings. You check the texture mapping on a per-object basis. On a RhinoObject you can use GetTextureChannels, GetTextureMapping to get them. Once you have a texture mapping you can retrieve the specifics with the different TryGetMapping* methods on the texture mapping, then recreate the mapping after adjusting and use SetTextureMapping with the correct channel to update.

Places to look in the documentation:

Rhino.Render.RhinoObject
Rhino.Render.TextureMapping

I see then what is this line refering to in:

In RhinoCommon the way to access texture mappings is as I described. But I’ll log a request to add a TextureMapping table.

1 Like

Yes! That’s exactly what I would need, being able to access it in RhinoDoc and File3dm!

Logged as RH-87442 Add a TextureMapping table to RhinoDoc