Notifications
Clear all

[Closed] SDK: Find BitmapTex coordinate mapping

I’m working on a renderer for Max and I’m running in to some trouble when working with BitmapTex texmaps. My issue is that I can’t tell whether a given BitmapTex is in “Texture” mode or “Environ” mode (top option in the Bitmap Coordinates panel).

The problem this leads to is that I need to call BitmapTex::EvalColor in one of two different ways depending on the value of this option. Without knowing how the coordinate mapping is set, I don’t know if I should be evaluating the texture in UV space (Texture mode) or XYZ space (Environ mode).

Anyone know how to do this through either c++ or maxscript?

2 Replies
 lo1

BitmapTex has a method GetUVGen()
From that object you can check GetCoordMapping to determine the mapping type.
Details in the documentation.

Thanks, that looks like exactly what I need.